mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-22 06:59:03 +00:00
When the updater or recovery selected the compatible private Node runtime and ran npm's JavaScript CLI with it, npm lifecycle children (preinstall and friends) resolved plain node from PATH and picked the unsupported system Node, so the install rejected itself. One shared PATH handoff now prepends the selected runtime's bin directory for every package-manager spawn in recovery, update environments, and explicit npm/pnpm execution, preserving npm_config_node and the explicit executable, scoped to the child only. Real-npm regression: lifecycle child reported v22.22.3 before, the private runtime after. Closes #164525.
5 lines
135 B
TypeScript
5 lines
135 B
TypeScript
export function withNodeRuntimePath(
|
|
env: NodeJS.ProcessEnv,
|
|
nodePath: string,
|
|
platform?: NodeJS.Platform,
|
|
): NodeJS.ProcessEnv;
|