Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion containers/agent/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -952,11 +952,17 @@ AWFEOF
echo 'export PATH="$NPM_CONFIG_PREFIX/bin:$PATH"' >> "/host${SCRIPT_FILE}"
if [ "${AWF_REQUIRE_NODE:-}" = "1" ]; then
cat >> "/host${SCRIPT_FILE}" << 'AWFEOF'
if ! command -v node >/dev/null 2>&1; then
if [ -n "${GH_AW_NODE_BIN:-}" ] && [ -x "${GH_AW_NODE_BIN}" ]; then
echo "[entrypoint] Node.js available via GH_AW_NODE_BIN: ${GH_AW_NODE_BIN}"
elif command -v node >/dev/null 2>&1; then
echo "[entrypoint] Node.js available on PATH: $(command -v node)"
else
echo "[entrypoint][ERROR] Copilot CLI requires Node.js, but 'node' is not available inside AWF chroot." >&2
echo "[entrypoint][ERROR] Ensure Node.js is installed on the runner and reachable from PATH inside the chroot." >&2
echo "[entrypoint][ERROR] If using setup-node or nvm, verify the install path is present and bind-mounted into /host." >&2
echo "[entrypoint][ERROR] Example locations include /opt/hostedtoolcache/..., $HOME/work/_tool/..., and $HOME/.nvm/..." >&2
echo "[entrypoint][ERROR] GH_AW_NODE_BIN=${GH_AW_NODE_BIN:-<unset>}" >&2
echo "[entrypoint][ERROR] PATH=$PATH" >&2
exit 127
fi
AWFEOF
Expand Down
Loading