From 4d3cfa4ef641d92749668d596d66ebf0230c3da0 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 14 Nov 2021 09:15:30 +0100 Subject: shutdownasap: capture_output should not swallow the exit code --- shutdownasap.in | 6 +++--- 1 file 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 -- cgit v1.2.3-70-g09d2