diff --git a/packages/mosaic/framework/tools/fleet/start-agent-session.sh b/packages/mosaic/framework/tools/fleet/start-agent-session.sh index 0fced5c1..d2e44eda 100755 --- a/packages/mosaic/framework/tools/fleet/start-agent-session.sh +++ b/packages/mosaic/framework/tools/fleet/start-agent-session.sh @@ -272,8 +272,9 @@ _build_runtime_bin_prefix() { # records it in ~/.profile. The fleet unit runs `env -i ... bash --noprofile --norc` # by design, so ~/.profile is never read and the directory has to be named here. # The npm probe below cannot cover this: it reports a package prefix - # (~/.npm-global), never a Node runtime directory. It is first so the bootstrapped - # runtime wins on a host that has both — that is the one the installer verified. + # (~/.npm-global), never a Node runtime directory. It sits ahead of the npm probe so + # the bootstrapped runtime wins on a host that has both — that is the one the installer + # verified — while an explicit MOSAIC_RUNTIME_BIN still outranks it. # Runtime binaries are `#!/usr/bin/env node`, so without this the pane resolves the # binary and then dies on `env: 'node': No such file or directory`. candidates+=("$PANE_HOME/.mosaic/node/current/bin")