Prevent command -v failure from aborting script in strict mode
This commit is contained in:
@@ -208,7 +208,7 @@ SUDO_CMDS=""
|
||||
|
||||
# Detect which hypervisor tools are present (check common sbin paths too)
|
||||
for cmd in pct qm lxc virsh docker; do
|
||||
cmd_path=$(command -v "$cmd" 2>/dev/null)
|
||||
cmd_path=$(command -v "$cmd" 2>/dev/null || true)
|
||||
# Also check sbin paths not always in PATH
|
||||
if [ -z "$cmd_path" ]; then
|
||||
for p in /usr/sbin/$cmd /usr/local/sbin/$cmd /sbin/$cmd; do
|
||||
|
||||
Reference in New Issue
Block a user