fix(statusline): resolve global ruflo version on Homebrew Node installs#2270
Draft
mamd69 wants to merge 1 commit into
Draft
fix(statusline): resolve global ruflo version on Homebrew Node installs#2270mamd69 wants to merge 1 commit into
mamd69 wants to merge 1 commit into
Conversation
getPkgVersion() derives the global node_modules dir from path.dirname(process.execPath). On Homebrew, /opt/homebrew/bin/node (and Intel's /usr/local/bin/node) is a symlink that Node resolves to a Cellar path (.../Cellar/node/<v>/bin/node), so the derived bin/../lib/node_modules points INSIDE the Cellar — where global packages are not installed. The probe misses and the statusline falls back to the hard-coded "3.6". This is the same blind spot ruvnet#2221 set out to fix for global installs; it just didn't cover Homebrew's Cellar layout (the most common macOS setup). Add the canonical prefix-based global module dirs (/opt/homebrew/lib/node_modules, /usr/local/lib/node_modules, /usr/lib/node_modules) to the probe list so Homebrew (Apple Silicon + Intel) and standard Linux global installs resolve correctly. The execPath-derived paths are kept first, so nvm/mise/Windows are unaffected. Applied in both the generator template (statusline-generator.ts) and the repo's own generated .claude/helpers/statusline.cjs so existing checkouts benefit without a regen. Repro: $ which node # /opt/homebrew/bin/node $ node -p process.execPath /opt/homebrew/Cellar/node/26.0.0/bin/node # derived probe: /opt/homebrew/Cellar/node/26.0.0/lib/node_modules (no ruflo) # actual global: /opt/homebrew/lib/node_modules/ruflo -> 3.10.33 # status bar before fix: "RuFlo V3.6" / after: "RuFlo V3.10.33"
meefs
pushed a commit
to meefs/claude-code-flow
that referenced
this pull request
Jun 2, 2026
…ing (ruvnet#2270 was a typo for ruvnet#2268) Co-Authored-By: RuFlo <ruv@ruv.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On macOS with Homebrew-installed Node, the status bar shows the hard-coded fallback
RuFlo V3.6even when ruflo is correctly installed globally and up to date.The cause is in
getPkgVersion()(instatusline-generator.ts, emitted into every generatedstatusline.cjs). It derives the globalnode_modulesdirectory frompath.dirname(process.execPath):Homebrew symlinks
/opt/homebrew/bin/node(Apple Silicon) — or/usr/local/bin/node(Intel) — into a Cellar path, and Node resolves the symlink inprocess.execPath. So the derived probe becomes:while global packages actually live at
/opt/homebrew/lib/node_modules. The probe misses, nopackage.jsonis found, and the version falls back to'3.6'.This is the same blind spot #2221 set out to fix for global installs — it just didn't account for Homebrew's Cellar layout, which is the most common macOS Node setup.
Repro
Fix
Add the canonical prefix-based global module directories to the probe list, after the existing
execPath-derived paths:The
execPath-derived paths stay first, so nvm / mise / Windows behaviour is unchanged. Nonpmspawn is added (the statusline renders often, so the no-spawn constraint is preserved).Scope
v3/@claude-flow/cli/src/init/statusline-generator.ts— source of truth (the templateruflo initwrites out)..claude/helpers/statusline.cjs— the repo's own generated statusline, kept in sync so existing checkouts benefit without a regen.The older
v3/@claude-flow/{cli,mcp}/.claude/helpers/statusline.cjscopies are a different (V3.5 / #1951-era) implementation and are intentionally left out of scope.Verification
After the fix, the generated statusline renders
RuFlo V3.10.33(the real global install) instead ofRuFlo V3.6.