launch_first_available.sh should skip empty cmds

This commit is contained in:
Souyama 2025-08-07 20:48:11 +05:30 committed by GitHub
parent 2b554cf286
commit 0506917b87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
for cmd in "$@"; do
[[ -z "$cmd" ]] && continue
eval "command -v ${cmd%% *}" >/dev/null 2>&1 || continue
eval "$cmd" &
exit
done
exit 1