[Feature]: Let the WSL backend use a Node that is not on the distro's global login PATH #6959
oxionics-bodo-kaiser
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Before submitting
Area
apps/desktop
Problem or use case
I am using NixOS-WSL (but this applies to any linux distribution where one doesn't want to have a specific node version installed globally) and would like to use this as a backend for t3code which runs on Windows.
Proposed solution
An optional setting for an explicit Node executable to use for the WSL backend — e.g.
wslNodePath, defaultnull. When set, preflight skips the login-shell discovery step and uses that binary directly (still applyingthe existing engine-range check at
DesktopWslEnvironment.ts:479-492, so a bad path fails loudly rather thansilently).
This fits the existing launch design without restructuring it: the launch already replays a
nodePathand aresolvedPathobserved during preflight(
apps/desktop/src/backend/DesktopBackendConfiguration.ts:587-603), and derives the server's PATH from theNode bin dir plus the login PATH. Pointing
nodePathat a store path keepsnpm/npx(same bin dir) andgit(login PATH) resolvable exactly as today.Why this matters
It makes the WSL backend usable on declaratively-managed distros without asking the user to mutate their
system, and it costs the project no per-distribution knowledge — no apt/dnf/pacman/nix detection, no install
path, just one optional override.
Smallest useful scope
Having a config option for the custom node path would allow me to setup a sandbox with a certain node version
Alternatives considered
No response
Risks or tradeoffs
No response
Examples or references
No response
Contribution
All reactions