Skip to content

Handle multiple nvm bin paths#11

Closed
mcvasquez wants to merge 1 commit intosteipete:mainfrom
mcvasquez:fix-nvm-path-discovery
Closed

Handle multiple nvm bin paths#11
mcvasquez wants to merge 1 commit intosteipete:mainfrom
mcvasquez:fix-nvm-path-discovery

Conversation

@mcvasquez
Copy link
Copy Markdown

Summary
CodexBar couldn’t find the codex binary when it was installed via nvm because PATH seeding added a literal ~/.nvm/versions/node/*/bin segment, which never globbed to real versioned bin folders. As a result, the RPC probe failed with "Codex RPC probe failed: Malformed response: codex app-server closed stdout" when the CLI wasn’t on PATH.

What changed

  • Sources/CodexBar/UsageFetcher.swift: Enumerate real ~/.nvm/versions/node/*/bin directories when seeding PATH for RPC and TTY probes, replacing the non-expanding wildcard entry

Before
1

2

After
3

Testing

  • swift build
  • swift test
  • ./Scripts/compile_and_run.sh

@steipete
Copy link
Copy Markdown
Owner

@mcvasquez Thank you! I wonder if my approach to collecting path's here is right at all, since that likely won't be the last edge case. Let me take a closer look.

@steipete
Copy link
Copy Markdown
Owner

I'm choosing a different approach for now that gets $PATH out of the configured shell and then caches this for the duration of the app run. Please test if that resolves this for you in 0.5.5 adn thanks again for your help and bringing this to my attention!

@steipete steipete closed this Nov 25, 2025
@mcvasquez
Copy link
Copy Markdown
Author

@steipete Thanks for the quick follow-up! I just tested version 0.5.5 and everything works perfectly on my side. Your new approach seems solid. Really appreciate how fast you addressed this and happy I could help!

@steipete
Copy link
Copy Markdown
Owner

wohoo! thanks for confirming and for the help!

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants