diff mbox series

[bug#60068,v2,3/3] guix-install.sh: Directly exit in case of errors in chk_require.

Message ID 20221214204640.16879-3-maxim.cournoyer@gmail.com
State New
Headers show
Series [bug#60068,v2,1/3] guix-install.sh: Add missing "useradd" command. | expand

Commit Message

Maxim Cournoyer Dec. 14, 2022, 8:46 p.m. UTC
* etc/guix-install.sh (chk_require): Directly exit in case of errors in
chk_require, instead of relying on 'set -e'.
---
 etc/guix-install.sh | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 62d85e765a..ea10f35250 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -137,10 +137,8 @@  chk_require()
         command -v "$c" &>/dev/null || warn+=("$c")
     done
 
-    [ "${#warn}" -ne 0 ] &&
-        { _err "${ERR}Missing commands: ${warn[*]}.";
-          return 1; }
-    
+    [ "${#warn}" -ne 0 ] && die "Missing commands: ${warn[*]}."
+
     _msg "${PAS}verification of required commands completed"
 }