Merge pull request 'fix(build): resolve shared npm snippet via COLIBRI_REPO + preflight it' (#93) from harden-shared-npm-snippet into main
Reviewed-on: #93
This commit is contained in:
commit
0deaae2586
1 changed files with 10 additions and 1 deletions
11
build.sh
11
build.sh
|
|
@ -1467,9 +1467,18 @@ EOF
|
|||
mkdir -p "${MOUNT_POINT}/home/clawdie" "${MOUNT_POINT}/etc/profile.d" "${MOUNT_POINT}/etc/skel"
|
||||
|
||||
# Install the canonical npm-global profile snippet (shared with agent-jail-bootstrap.sh).
|
||||
# The snippet lives in colibri; resolve its repo the same way every other
|
||||
# colibri consumer here does so COLIBRI_REPO overrides are honored.
|
||||
resolve_colibri_paths
|
||||
_npm_profile_src="${_resolved_colibri_repo}/packaging/freebsd/clawdie-npm-profile.sh"
|
||||
if [ ! -f "${_npm_profile_src}" ]; then
|
||||
echo "ERROR: shared npm profile snippet missing: ${_npm_profile_src}"
|
||||
echo " It ships in colibri packaging/freebsd/. Set COLIBRI_REPO=/path/to/colibri."
|
||||
exit 1
|
||||
fi
|
||||
{
|
||||
printf 'NPM_PREFIX="/opt/clawdie/npm-global"\n'
|
||||
cat "${SCRIPT_DIR}/../colibri/packaging/freebsd/clawdie-npm-profile.sh"
|
||||
cat "${_npm_profile_src}"
|
||||
} > "${MOUNT_POINT}/etc/profile.d/clawdie-npm.sh"
|
||||
chmod 0644 "${MOUNT_POINT}/etc/profile.d/clawdie-npm.sh"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue