Skip to content

Commit 7f73186

Browse files
CodyRayclaude
andcommitted
fix(desktop): find linuxbrew node for the WSL backend
The remote node resolver repairs PATH when a login shell does not expose node, but its fallback list only covered macOS Homebrew (/opt/homebrew/bin, /usr/local/bin). Homebrew on Linux installs to /home/linuxbrew/.linuxbrew/bin, which brew shellenv typically adds only in .bashrc, so login shells - and therefore the WSL backend probe and SSH remotes - reported node as missing even when a satisfying version was installed. Co-Authored-By: Claude Fable 5 <[email protected]>
1 parent 105cd5e commit 7f73186

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎packages/ssh/src/tunnel.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ describe("ssh tunnel scripts", () => {
116116
assert.include(script, "remote_node_satisfies_engine()");
117117
assert.include(script, "function satisfiesSemverRange");
118118
assert.include(script, "satisfiesSemverRange(rawVersion, range)");
119+
assert.include(script, 'prepend_path_if_dir "/home/linuxbrew/.linuxbrew/bin"');
119120
assert.include(script, 'prepend_path_if_dir "$VOLTA_HOME/bin"');
120121
assert.include(script, 'prepend_path_if_dir "$HOME/.asdf/shims"');
121122
assert.include(script, 'prepend_path_if_dir "$HOME/.local/share/mise/shims"');

‎packages/ssh/src/tunnel.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ ensure_remote_node_path() {
345345
prepend_path_if_dir "$HOME/.local/bin"
346346
prepend_path_if_dir "$HOME/bin"
347347
prepend_path_if_dir "/opt/homebrew/bin"
348+
prepend_path_if_dir "/home/linuxbrew/.linuxbrew/bin"
348349
prepend_path_if_dir "/usr/local/bin"
349350
prepend_path_if_dir "/usr/bin"
350351
prepend_path_if_dir "/bin"

0 commit comments

Comments
 (0)