Skip to content

fix: expose bundled Node.js to installer subprocesses - #115

Open
HP-network wants to merge 1 commit into
MCSManager:masterfrom
HP-network:fix/node-path-for-installer
Open

HP-network wants to merge 1 commit into
MCSManager:masterfrom
HP-network:fix/node-path-for-installer

Conversation

@HP-network

Copy link
Copy Markdown

When the installer runs npm install with a bundled Node.js located under /opt/mcsmanager, npm lifecycle scripts inherit the caller's PATH. On clean systems this can produce node: not found, even though the installer itself can invoke the absolute Node.js path.

Add the managed Node.js bin directory to PATH after Node.js setup in both language variants. This also makes the generated systemd unit expose the same path to the service.

Fixes MCSManager/MCSManager#2338

Checks:

  • bash -n setup.sh setup_cn.sh
  • Verified both scripts export ${node_path}/bin before component installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report] 一键安装脚本因 PATH 环境变量问题导致 daemon 组件 npm install 失败

1 participant