File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -711,8 +711,8 @@ AWFEOF
711711if ! command -v node >/dev/null 2>&1; then
712712 echo "[entrypoint][ERROR] Copilot CLI requires Node.js, but 'node' is not available inside AWF chroot."
713713 echo "[entrypoint][ERROR] Ensure Node.js is installed on the runner and reachable from PATH inside the chroot."
714- echo "[entrypoint][ERROR] Common locations: /opt/hostedtoolcache/... or \ $HOME/.nvm/... (bind-mounted by AWF)."
715- echo "[entrypoint][ERROR] Verify \ $HOME/.nvm exists on the host and contains an installed Node.js version."
714+ echo "[entrypoint][ERROR] Common locations: /opt/hostedtoolcache/... or $HOME/.nvm/... (bind-mounted by AWF)."
715+ echo "[entrypoint][ERROR] Verify $HOME/.nvm exists on the host and contains an installed Node.js version."
716716 exit 127
717717fi
718718AWFEOF
Original file line number Diff line number Diff line change @@ -817,11 +817,9 @@ export function generateDockerCompose(
817817
818818 // Copilot CLI requires Node.js. Ask the agent entrypoint to fail fast with a
819819 // clear diagnostic if node is not reachable inside the chroot before startup.
820- if (
821- config . copilotGithubToken
822- || config . copilotApiKey
823- || / \b c o p i l o t \b / i. test ( config . agentCommand )
824- ) {
820+ const commandExecutable = config . agentCommand . trim ( ) . split ( / \s + / , 1 ) [ 0 ] || '' ;
821+ const isCopilotCommand = / ( ^ | \/ ) c o p i l o t $ / i. test ( commandExecutable ) ;
822+ if ( config . copilotGithubToken || config . copilotApiKey || isCopilotCommand ) {
825823 environment . AWF_REQUIRE_NODE = '1' ;
826824 }
827825
You can’t perform that action at this time.
0 commit comments