Skip to content

Resolve login shell PATH for .app bundle launches#129

Merged
dhilgaertner merged 5 commits intomainfrom
feature/crow-123-shell-path-resolution
Apr 8, 2026
Merged

Resolve login shell PATH for .app bundle launches#129
dhilgaertner merged 5 commits intomainfrom
feature/crow-123-shell-path-resolution

Conversation

@dhilgaertner
Copy link
Copy Markdown
Contributor

Summary

  • Adds ShellEnvironment singleton in CrowCore that resolves the user's full PATH from their login shell (zsh -lc 'echo $PATH') on first access, with a 5-second timeout and fallback to well-known Homebrew paths
  • Injects the resolved environment into all Process calls across GitManager, ProviderManager, IssueTracker, SessionService, and AppDelegate
  • Replaces /usr/bin/which-based dependency check in AppDelegate with ShellEnvironment.shared.hasCommand()

Closes #123

Test plan

  • make build passes
  • swift test --package-path Packages/CrowCore passes (101 tests)
  • make release → launch Crow.app from Finder (not terminal) → verify issues panel loads
  • Verify gh, glab, git commands work in the release build
  • Verify dependency check in menu bar correctly detects installed/missing tools

🤖 Generated with Claude Code

When Crow.app is launched from Finder/Dock, macOS provides a minimal
PATH that excludes Homebrew-installed tools like gh and glab. Add a
ShellEnvironment singleton in CrowCore that resolves the user's full
PATH from their login shell on first access, then inject it into all
Process calls across GitManager, ProviderManager, IssueTracker,
SessionService, and AppDelegate.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dhilgaertner dhilgaertner requested a review from dgershman as a code owner April 7, 2026 19:57
dhilgaertner and others added 4 commits April 7, 2026 15:01
The bundle script only copied CrowApp into Contents/MacOS/, leaving the
crow CLI binary behind. The app needs the CLI for hook event delivery
but could not find it when launched from Finder. The existing
findCrowBinary() already checks the same directory as the running
executable, so placing crow alongside CrowApp makes it work.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dhilgaertner dhilgaertner merged commit 215b6d9 into main Apr 8, 2026
1 check passed
@dhilgaertner dhilgaertner deleted the feature/crow-123-shell-path-resolution branch April 8, 2026 19:49
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.

Release build cannot find gh/glab — PATH not resolved from login shell

1 participant