Repository navigation
prompt the user to install Git if not on PATH - #1143
Conversation
|
Opening this up for feedback - the original issue doesn't mention an intermediate step but I think this is a bit more friendly to the end user. |
|
This is minor, but I think we should re-phrase
to
|
| private onExternalLink = () => { | ||
| // TODO: update this URL once the docs team has a better resource to reference | ||
| const platform = __DARWIN__ ? 'mac' : 'windows' | ||
| const url = `https://help.github.com/articles/set-up-git/#platform-${platform}` |
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.
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.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
@niik @iAmWillShepherd Could one of you folks with more Windows experience review this? |
| // `where` will return 0 when the executable | ||
| // is found under PATH, or 1 if it cannot be found | ||
| process.on('close', function (code) { | ||
| resolve(code === 0) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| <Dialog | ||
| id='install-git' | ||
| type='warning' | ||
| title={__DARWIN__ ? 'Open in Terminal' : 'Op&en command prompt'} |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
Oh I totally didn't realize you did the work for macOS too 😅 Clearly I should have actually looked at the code. So macOS already takes care of this for us. A shim is installed by default so that if you try to run |
@joshaber that answers my question about whether it's worth testing by invoking and validating that I get a reasonable output by |
So you think even bothering to check |
Yup, combined with a Complication that macOS GUI apps don't inherit the shell environment means it'd be complex to get it right and wouldn't really provide any additional value. We can revisit if users complain, but we do nothing in Desktop Classic Mac currently. |
|
🍎 |
|
Friendly bump on this before it gets consumed by merge conflicts. |
| onDismissed={this.props.onDismissed}> | ||
| <DialogContent> | ||
| <p> | ||
| We were unable to locate Git on your system. This means the shell won't be able to execute any Git commands. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| We were unable to locate Git on your system. This means the shell won't be able to execute any Git commands. | ||
| </p> | ||
| <p> | ||
| Click <strong>More information</strong> to learn how to install and add Git to your shell for your operating system. |
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.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| private onExternalLink = () => { | ||
| // TODO: update this URL once the docs team has a better resource to reference | ||
| const platform = __DARWIN__ ? 'mac' : 'windows' | ||
| const url = `https://help.github.com/articles/set-up-git/#platform-${platform}` |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Fixes #813
help.github.comURL to use as a placeholder