zsh:funcs:crypt-*mount: Set pipe_fail
Set `pipe_fail` so that if for example the `grep` fails while getting `$mount_point`, the function returns early.
This commit is contained in:
@@ -253,7 +253,7 @@ safe-remove() {
|
||||
}
|
||||
|
||||
crypt-mount() {
|
||||
emulate -L zsh -o err_return
|
||||
emulate -L zsh -o err_return -o pipe_fail
|
||||
[[ $# -gt 0 ]]
|
||||
[[ -b "$1" ]]
|
||||
|
||||
@@ -278,7 +278,7 @@ crypt-mount() {
|
||||
}
|
||||
|
||||
crypt-umount() {
|
||||
emulate -L zsh -o err_return
|
||||
emulate -L zsh -o err_return -o pipe_fail
|
||||
[[ $# -gt 0 ]]
|
||||
[[ -b "$1" ]]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user