Prevent command -v failure from aborting script in strict mode
All checks were successful
Build-Publish / build (linux/amd64) (push) Successful in 4s
Build-Publish / build (linux/arm64) (push) Successful in 11s
Build-Publish / create-manifest (push) Successful in 1s
Build-Publish / publish-template (push) Successful in 8s

This commit is contained in:
j
2026-03-08 16:20:38 +13:00
parent 2e470b1fc1
commit 939a79a91e

View File

@@ -208,7 +208,7 @@ SUDO_CMDS=""
# Detect which hypervisor tools are present (check common sbin paths too) # Detect which hypervisor tools are present (check common sbin paths too)
for cmd in pct qm lxc virsh docker; do 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 # Also check sbin paths not always in PATH
if [ -z "$cmd_path" ]; then if [ -z "$cmd_path" ]; then
for p in /usr/sbin/$cmd /usr/local/sbin/$cmd /sbin/$cmd; do for p in /usr/sbin/$cmd /usr/local/sbin/$cmd /sbin/$cmd; do