You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Remote provisioning fails on fresh hosts without Node (bootstrap exits 2 in nodePathPrelude) #20
Local: 0.2.2-rc.1 (DSH Desktop, Windows 11). Remote: fresh Ubuntu 24.04, no Node installed.
Area
Remote provisioning
Reproduction steps
Install dsh-remote-local-plugin@0.8.18 (desktop profile) and restart.
Add an SSH host that has no Node.js installed (the auto-install-Node path).
Let auto-connect run provisioning. The agent tarball is uploaded and ~/.local/share/dsh-remote / ~/.dsh/remote-agent are created, then provisioning fails and retries with:
远端自动安装失败:remote bootstrap exited with 2
Expected behavior
Bootstrap detects the missing Node and installs the configured remoteNodeVersion (22.19.0 by default), then continues.
Relevant logs
Root cause appears to be nodePathPrelude() in the generated bootstrap script. It runs under set -euo pipefail and contains:
On a host without nvm, the glob does not match, ls exits 2, and pipefail makes the whole script exit 2 before the Node-install step. Reproduced standalone by running the prelude on the remote host: PRELUDE_EXIT=2.
Workaround: install Node 22.19.0 on the remote host first; provisioning then completes in ~30s.
Possible fix: append || true to the ls ... | sort -V | tail -1 pipeline (or guard with compgen -G before listing).
The bootstrap now treats the nvm probe as best-effort, so a host without nvm no longer aborts before the Node auto-install step runs. Added a regression test that executes the generated prelude with no nvm and no node.
Verified with an isolated Ubuntu 24.04 container with no Node/nvm: the fixed installer uploaded the agent and ran the full bootstrap; Node 22.19.0 was auto-installed, DSH 0.2.2-rc.1 and the remote agent were installed, dsh web started, and the agent reached ready state.
Activity
Golden-Pigeon commentedon Nov 9, 2026
Fixed in #24.
The bootstrap now treats the nvm probe as best-effort, so a host without nvm no longer aborts before the Node auto-install step runs. Added a regression test that executes the generated prelude with no nvm and no node.
Verified with an isolated Ubuntu 24.04 container with no Node/nvm: the fixed installer uploaded the agent and ran the full bootstrap; Node 22.19.0 was auto-installed, DSH 0.2.2-rc.1 and the remote agent were installed,
dsh webstarted, and the agent reached ready state.Thanks @Solaris136 for the detailed report.