Repository navigation
Pass git the shell environment's PATH. - #1578
EtherTyper wants to merge 4 commits into
Conversation
This should fix desktop#1391 and desktop#78. It uses the same fix as atom/github#765.
shiftkey
left a comment
There was a problem hiding this comment.
I want to get this setup and tested so I can validate it's fixed, but here are some initial comments.
| successExitCodes: new Set([ 0 ]), | ||
| expectedErrors: new Set(), | ||
| env: { | ||
| GIT_TERMINAL_PROMPT: '0', |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| expectedErrors: new Set(), | ||
| env: { | ||
| GIT_TERMINAL_PROMPT: '0', | ||
| PATH: process.env.PATH || '', |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
I haven't dug into this at all, but I'm a bit surprised a spawned task doesn't already inherit the parent's environment. |
|
@joshaber yeah, I'm gonna look into some reading and experimenting about this tomorrow - I've done a bunch of hacks around stuff, I should get back to the basics. A skim of the |
|
Also maybe helpful context: macOS apps don't inherit the environment unless they're launched from a shell. So the behavior you see when doing, e.g., |
|
@joshaber Yup, it turns out the fix only works on development builds ( |
|
In that case, why does the same sort of fix work for atom/github? |
|
Atom does some fancy footwork to get the shell environment regardless of how they're launched. See atom/atom#11054. |
|
Oh. Should I close this pull request for now until that work gets done for Desktop then? |
|
Sure, unless you wanna repurpose this PR for that 😄 |
This should fix #1391 and #78. It uses the same fix as atom/github#765.
I tested this by committing it (c1e0b2c) with a signature from the GitHub Desktop app itself.