diff --git a/scripts/pvics b/scripts/pvics index 18cdbb6b..8fe21a3b 100755 --- a/scripts/pvics +++ b/scripts/pvics @@ -1474,12 +1474,6 @@ main() { local - set -Eu - # call cleanup on error - # PIPE is needed to allow out=$(main list -i | grep -m 1 ) - # bash will close the subshell executing the main function as soon as grep has found a match - # cleanup will not be executed anymore - trap 'cleanup 1' ERR EXIT PIPE - # general ACTION="" NBD="" @@ -1518,6 +1512,12 @@ main() { # parse command line cli "$@" + # call cleanup on error + # PIPE is needed to allow out=$(main list -i | grep -m 1 ) + # bash will close the subshell executing the main function as soon as grep has found a match + # cleanup will not be executed anymore + trap 'cleanup 1' ERR EXIT PIPE + # set up logger setup_logger