fix: preserve shell path for gh cli#172
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis change fixes environment variable precedence in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the environment variable merging logic in the desktop server to ensure that the PATH from the login shell is preserved, preventing it from being overridden by the process environment. This ensures that Homebrew commands and other shell-specific paths remain discoverable. The changes also maintain the priority of GitHub CLI configuration from the process environment. Corresponding test cases have been added to verify these behaviors. I have no feedback to provide.
Summary
Preserve the login shell PATH when PawWork prepares the embedded server environment, so Homebrew-installed commands such as
ghremain discoverable from PawWork shell flows.Why
PR #167 correctly preserved GitHub CLI auth by deriving
GH_CONFIG_DIRbefore PawWork overridesXDG_CONFIG_HOME, but it also changed the general env merge so a narrow macOS GUIprocess.env.PATHcould override the login shell PATH. This madeghlook missing inside PawWork even though the normal terminal could resolve it.Related Issue
Fixes #170.
How To Verify
Screenshots or Recordings
Not applicable. No visible UI change.
Checklist
dev, and my PR title and commit messages use Conventional Commits in EnglishSummary by CodeRabbit
Bug Fixes
Tests