guix-install.sh: Fix chk_require exiting without warning.
* etc/guix-install.sh (chk_require): Because of the set -e option, Bash was exiting when the command `command -v "$c" &>/dev/null' was running on its own. Instead, we now test the command and accumulate warning messages in a single statement by chaining the command with a logical OR. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
428adbc2c4
commit
593fe73667
|
@ -86,9 +86,7 @@ chk_require()
|
||||||
_debug "--- [ $FUNCNAME ] ---"
|
_debug "--- [ $FUNCNAME ] ---"
|
||||||
|
|
||||||
for c in ${cmds[@]}; do
|
for c in ${cmds[@]}; do
|
||||||
command -v "$c" &>/dev/null
|
command -v "$c" &>/dev/null || warn+=("$c")
|
||||||
[ "$?" -eq "1" ] &&
|
|
||||||
warn+=("$c")
|
|
||||||
done
|
done
|
||||||
|
|
||||||
[ "${#warn}" -ne 0 ] &&
|
[ "${#warn}" -ne 0 ] &&
|
||||||
|
|
Loading…
Reference in New Issue