Merge pull request #158 from outis1one/claude/bootstrap-script-404-d8dc7h

common.sh: fall back to /usr/bin/docker when PATH is restricted under…
This commit is contained in:
Outis
2026-06-28 10:39:53 -04:00
committed by GitHub
+6 -2
View File
@@ -184,7 +184,9 @@ require_docker() {
return 1
fi
if ! command -v docker &>/dev/null; then
# command -v may miss the binary if PATH is restricted under sudo; check
# the canonical apt install location as a fallback before giving up.
if ! command -v docker &>/dev/null && ! [ -x /usr/bin/docker ]; then
log_error "Docker binary not found after install — something went wrong."
return 1
fi
@@ -194,7 +196,9 @@ require_docker() {
&& log_info "Added $ACTUAL_USER to the docker group (re-login or run 'newgrp docker' to activate)"
fi
log_success "Docker installed ($(docker --version 2>/dev/null))"
local _docker_bin
_docker_bin="$(command -v docker 2>/dev/null || echo /usr/bin/docker)"
log_success "Docker installed ($("$_docker_bin" --version 2>/dev/null))"
}
# ── Command execution honoring dry-run ───────────────────────────────────────