fix(desktop): find linuxbrew node for the WSL backend - #7827
Conversation
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>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
ApprovabilityVerdict: Approved at 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. |
## What's Changed * chore(mobile): drop dead nitro-markdown tgz override and @expo/metro-runtime by @juliusmarminge in pingdotgg/t3code#13148 * feat(web): show settings scope as a sentence at the top of the page by @juliusmarminge in pingdotgg/t3code#13139 * refactor(web): move settings scope pickers into breadcrumbs by @Yash-Singh1 in pingdotgg/t3code#13165 * feat(auth): share provider sign-in flows and credential bindings by @juliusmarminge in pingdotgg/t3code#12983 * refactor(mobile): git sheets use uniwind platform variants instead of className ternaries by @juliusmarminge in pingdotgg/t3code#13161 * chore(mobile): name the two project favicon caches by their job by @juliusmarminge in pingdotgg/t3code#13160 * revert(mobile): git sheets back to Platform.OS ternaries (un-guarded uniwind variants broke both platforms) by @juliusmarminge in pingdotgg/t3code#13169 * docs(mobile): document the two mobile routes that intentionally skip deep links by @juliusmarminge in pingdotgg/t3code#13164 * refactor(mobile): break module cycles with focused extractions by @juliusmarminge in pingdotgg/t3code#13151 * fix(server): generate PR diffs from branch changes by @Yash-Singh1 in pingdotgg/t3code#13170 * fix(web): preserve nested scroll behavior in chat timeline by @Yash-Singh1 in pingdotgg/t3code#13167 * test(web): cover usage model ordering without static markup by @flamboh in pingdotgg/t3code#13104 * fix(desktop): find linuxbrew node for the WSL backend by @CodyRay in pingdotgg/t3code#7827 * chore(models): use GPT-6 Luna for text generation by @extoci in pingdotgg/t3code#13115 * fix(mobile): keep ordinary offline outbox failures out of console.warn by @juliusmarminge in pingdotgg/t3code#13144 * feat(providers): check remote compatibility ranges by @juliusmarminge in pingdotgg/t3code#13130 * chore(lint): keep mobile theme escape-hatch allowlist honest by @juliusmarminge in pingdotgg/t3code#13146 * fix(web): the pull request badge reads at the meta size again by @juliusmarminge in pingdotgg/t3code#13175 * fix(mobile): uniwind platform variants stay guarded on both platforms by @juliusmarminge in pingdotgg/t3code#13172 * refactor(mobile): git sheets use uniwind platform variants instead of className ternaries by @juliusmarminge in pingdotgg/t3code#13185 * refactor(mobile): remaining className platform ternaries become class variants by @juliusmarminge in pingdotgg/t3code#13188 * fix(web): align provider emails without clipping by @Derpedyea in pingdotgg/t3code#13174 * perf(mobile): recycle the default v2 home list and scope the snooze minute tick by @juliusmarminge in pingdotgg/t3code#13149 * refactor(mobile): retire the legacy grouped thread list by @juliusmarminge in pingdotgg/t3code#13183 * fix(server): background PR checks spend less GitHub quota by @juliusmarminge in pingdotgg/t3code#13189 * fix(server): background PR sync reads summaries in batches by @juliusmarminge in pingdotgg/t3code#13198 * fix(server): GitHub PR lookups stop probing owner-qualified heads by @juliusmarminge in pingdotgg/t3code#13200 * chore(mobile): clear the legacy-list deletion fallout by @juliusmarminge in pingdotgg/t3code#13203 ## New Contributors * @CodyRay made their first contribution in pingdotgg/t3code#7827 **Full Changelog**: pingdotgg/t3code@v0.0.43-nightly.20260922.2123...v0.0.43-nightly.20260923.2135 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.43-nightly.20260923.2135
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 theensure_remote_node_pathfor this exact case.Note that
/home/linuxbrew/.linuxbrew/binis 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
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
~/.bashrcand 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_pathfor WSL backendPrepends
/home/linuxbrew/.linuxbrew/binto the PATH sequence thatensure_remote_node_pathsearches 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.