Make ISO build PATH independent

This commit is contained in:
Sam & Claude 2026-05-12 17:38:33 +02:00 committed by 123kupola
parent 548d28a57a
commit 389cab3aa2
3 changed files with 5 additions and 2 deletions

View file

@ -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"

View file

@ -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}"

View file

@ -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