diff options
author | Erich Eckner <git@eckner.net> | 2021-11-14 09:15:30 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-11-14 09:15:30 +0100 |
commit | 4d3cfa4ef641d92749668d596d66ebf0230c3da0 (patch) | |
tree | 08096f084b1bb738e9f9a765a73ea70bc384b88f | |
parent | 02f0f10d414beb33bf92ce0f9b7a0c97055422a2 (diff) | |
download | shutdownasap-4d3cfa4ef641d92749668d596d66ebf0230c3da0.tar.xz |
shutdownasap: capture_output should not swallow the exit code
-rwxr-xr-x | shutdownasap.in | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shutdownasap.in b/shutdownasap.in index a902cbf..df38d3e 100755 --- a/shutdownasap.in +++ b/shutdownasap.in @@ -54,9 +54,9 @@ capture_output() { local exit_code local output output=$( - "$@" 2>&1 \ - || exit_code=$? - ) + "$@" 2>&1 + ) \ + || exit_code=$? if ! ${quiet}; then printf '%s\n' "${output}" fi |