Skip to content

fix(preflight): detect Grok installed in ~/.grok/bin - #9271

Closed
zime78 wants to merge 1 commit into
stablyai:mainfrom
zime78:contrib/grok-path-preflight
Closed

zime78 wants to merge 1 commit into
stablyai:mainfrom
zime78:contrib/grok-path-preflight

Conversation

@zime78

@zime78 zime78 commented Jul 18, 2026 •

Copy link
Copy Markdown

Summary

  • Include ~/.grok/bin in the packaged macOS process PATH alongside the existing agent-specific fallback install directories.
  • Allow GUI-launched Orca to detect a Grok CLI installation that works in the user's shell but is absent from the minimal Electron launch environment.

Screenshots

No visual change.

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm build
  • Updated targeted regression coverage: 1 test file / 23 tests passed, including the packaged macOS PATH assertion.

AI Review Report

Targeted review checked that the fallback is limited to packaged macOS startup, uses the existing home-directory lookup and path.join, and does not change Linux/Windows launch behavior. git diff --check and TypeScript type checking passed. Cross-platform/SSH review confirmed there are no hard-coded separators, shortcuts, labels, or remote-host command changes.

Security Audit

The change adds a fixed user-local binary directory to the same existing PATH fallback list; it adds no shell interpolation, command execution, auth, secrets, dependency, or writable path. The path is derived from Electron's home directory and joined with Node path utilities.

Notes

  • Full repository lint/test/build were not run; the targeted suite and full typecheck passed.

ELI5

Grok installed under ~/.grok/bin was invisible to GUI-launched Orca on macOS because that path was not on Electron's PATH. The preflight PATH now includes that folder so Grok is detected.

@nwparker nwparker added the bug Something isn't working label Jul 27, 2026
@Jinwoo-H

Copy link
Copy Markdown
Contributor

Closing this submitted branch and routing the bug to canonical owner issue #17590. We will carry the work ourselves on current main and will not request contributor follow-up. Full contributor credit is preserved for @zime78. No action is requested from you. Thank you.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants