From 389cab3aa263ae2fb9397caac2aa81f605cd51dc Mon Sep 17 00:00:00 2001 From: Sam & Claude Date: Tue, 12 May 2026 17:38:33 +0200 Subject: [PATCH] Make ISO build PATH independent --- build.sh | 3 +++ firstboot/shell-npm-globals.sh | 2 +- firstboot/shell-system.sh | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 07a1b14f..e2be5a9c 100755 --- a/build.sh +++ b/build.sh @@ -26,6 +26,9 @@ set -e SCRIPT_DIR="$(dirname "$(realpath "$0")")" +# Make build host command lookup independent from the invoking user's login PATH. +PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${PATH:-}" +export PATH TMP_DIR="${SCRIPT_DIR}/tmp" PKG_LIST_DIR="${SCRIPT_DIR}/packages" PKG_REPO_DIR="${TMP_DIR}/packages" diff --git a/firstboot/shell-npm-globals.sh b/firstboot/shell-npm-globals.sh index c71f0766..036d61f5 100755 --- a/firstboot/shell-npm-globals.sh +++ b/firstboot/shell-npm-globals.sh @@ -15,7 +15,7 @@ NPM_GLOBALS_DIR="${NPM_GLOBALS_DIR:-${SHARE}/npm-globals}" CLAWDIE_HOME="${CLAWDIE_HOME:-/home/clawdie}" # MUST match shell-system.sh's /etc/profile.d/clawdie.sh which sets: # export npm_config_prefix="/opt/clawdie/npm-global" -# export PATH="/opt/clawdie/npm-global/bin:${PATH}" +# export PATH="/opt/clawdie/npm-global/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${PATH}" # Otherwise globals land in /usr/local/bin and the clawdie user's PATH # (and the agent runtime's commandExists() probes) won't find them. NPM_PREFIX="${NPM_PREFIX:-/opt/clawdie/npm-global}" diff --git a/firstboot/shell-system.sh b/firstboot/shell-system.sh index d20c0b7e..935e9ba4 100755 --- a/firstboot/shell-system.sh +++ b/firstboot/shell-system.sh @@ -200,7 +200,7 @@ clawdie_shell_system_setup_env() { # Adds npm global bin directory to PATH export npm_config_prefix="/opt/clawdie/npm-global" -export PATH="/opt/clawdie/npm-global/bin:${PATH}" +export PATH="/opt/clawdie/npm-global/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:\${PATH}" export LANG="${normalized_locale}" export LC_ALL="${normalized_locale}" EOF