2.0 KiB
2.0 KiB
APP-4188: Git operations buttons respect the user's interactive shell PATH
Summary
The code-review panel's git operations buttons (Commit, Push, Publish, Create PR, Commit and push, Commit and create PR) must succeed regardless of how Warp was launched. When opened from Finder/Dock, Warp inherits launchd's minimal PATH, which excludes Homebrew / MacPorts / Nix / asdf / etc. Pushes to LFS-enabled repos fail (LFS pre-push hook can't find git-lfs), and PR creation fails when gh isn't on /usr/bin.
Behavior
- Every subprocess the git-ops buttons spawn (
git commit,git push,gh pr view,gh pr create, and hooksgitinvokes) runs with thePATHthe user would see in an interactive login shell (zsh -i -l/ equivalent). Launch method is irrelevant — Finder, Dock, terminal,open -a, etc. - On a Git LFS repo, Push / Publish / Commit and push / Commit and create PR succeeds whenever the user has
git-lfsinstalled and reachable from their shell. - Create PR / Commit and create PR succeeds whenever the user has
ghinstalled, authenticated, and reachable from their shell. The header'sPR #Nbadge populates under the same conditions. - If a tool is genuinely missing, the existing friendly-error toasts still fire (e.g. "GitHub CLI (gh) not installed."). No regression on error messaging.
- First git op per Warp session may pay a one-time shell-capture cost (<1s typically; bounded by
.zshrcload). Absorbed by the existing loading state; no new UI. Subsequent ops reuse the cache. - If the shell capture fails, subprocesses fall back to the inherited
PATH— no hang, behavior no worse than today. - No new settings or UI. Behavior is always-on.
Validation
- Launch Warp from Finder with Homebrew-only
git-lfs. On a LFS repo, Commit and push → succeeds. - Uninstall
git-lfs. Repeat → existing "Git operation failed." toast. - Same setup with Homebrew-only
gh, click Create PR → succeeds; header showsPR #N. - Launch Warp from a terminal → all git ops behave as today.