Skip to content

fix(desktop): find linuxbrew node for the WSL backend - #7827

Open
CodyRay wants to merge 1 commit into
pingdotgg:mainfrom
CodyRay:fix/remote-node-linuxbrew-path
Open

fix(desktop): find linuxbrew node for the WSL backend#7827
CodyRay wants to merge 1 commit into
pingdotgg:mainfrom
CodyRay:fix/remote-node-linuxbrew-path

Conversation

@CodyRay

@CodyRay CodyRay commented Aug 21, 2026

Copy link
Copy Markdown

What Changed

Additional path for Homebrew on Linux was added, so that node installed via brew on all platforms (not just mac) will be detected as a fallback.

Why

I use Windows through WSL. After turning on the WSL backend, I got the "WSL backend couldn't start" message due to missing node. I had node installed via Homebrew for Linux. The brew install only adds the path to ~/.bashrc, so the login shell didn't have node on the path either. Homebrew on Mac was already covered in the ensure_remote_node_path for this exact case.

Note that /home/linuxbrew/.linuxbrew/bin is a fixed path for all installs. This is the static directory that brew uses for all Linux installs - it is the direct equivalent of /opt/homebrew/bin. In otherwords it isn't anything specific to my setup, machine, or a hallucinated placeholder.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes, not applicable
  • I included a video for animation/interaction changes, not applicable

Workaround

If others encounter this issues add eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" to your bash profile.


Note

Low Risk
Small PATH fallback addition in remote shell scripts; no auth, data, or protocol changes.

Overview
Remote SSH/WSL node discovery now also looks in /home/linuxbrew/.linuxbrew/bin, the default Linux Homebrew prefix, next to the existing macOS Homebrew path.

This lets non-interactive remote shells find Node installed via brew on Linux (including WSL) when brew is only on ~/.bashrc and not on the login PATH. A unit assertion covers the new path in the generated runner script.

Reviewed by Cursor Bugbot for commit 7f73186. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add Linuxbrew bin path to ensure_remote_node_path for WSL backend

Prepends /home/linuxbrew/.linuxbrew/bin to the PATH sequence that ensure_remote_node_path searches when locating a usable Node.js on the remote host. This lets the WSL backend discover a Linuxbrew-installed node. Updates the corresponding test assertion in tunnel.test.ts.

Macroscope summarized 7f73186.

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 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: de575ca5-e173-46ea-8d2c-ac3dd0f20a51

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the vouch:unvouched PR author is not yet trusted in the VOUCHED list. label Aug 21, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 7f73186

Macroscope's review found this PR approvable — Adds the linuxbrew bin path to the existing list of directories searched for node on WSL. The change follows the established pattern exactly and includes a corresponding test assertion.

You can add or adjust custom eligibility rules. Learn more.

@github-actions github-actions Bot added the size:XS 0-9 changed lines (additions + deletions). label Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant