Skip to content

make github CLI work in Git Bash - #2712

Merged
joshaber merged 16 commits into
masterfrom
make-cli-work-with-bash
Sep 20, 2017
Merged

joshaber merged 16 commits into
masterfrom
make-cli-work-with-bash

Conversation

@shiftkey

@shiftkey shiftkey commented Sep 13, 2017 •

Copy link
Copy Markdown
Member

With the current latest release (but probably earlier builds), github . won't work in Git Bash:

This is because the bash environment won't resolve a .cmd or .bat file matching the name like cmd.exe and Powershell do.

The fix for this is to bundle a second trampoline and script pair that light up in Git Bash. Given how similar this is to the current batch trampoline, I've borrowed a bunch of that code here.

  • review changes and ensure it's good to ship
  • reduce duplicate code for generating trampoline
  • test cmd and powershell are unaffected

@joshaber

Copy link
Copy Markdown
Contributor

The fix for this is to bundle a second trampoline

giphy-2

@shiftkey

Copy link
Copy Markdown
Member Author

@shiftkey shiftkey added this to the 1.0.x milestone Sep 18, 2017
@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Sep 18, 2017
@shiftkey

Copy link
Copy Markdown
Member Author

This is ready to be reviewed and merged as part of the post 1.0 tidy up 🎉

@joshaber joshaber self-assigned this Sep 18, 2017

@joshaber joshaber left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚘 ❓

sh "$DIR/${versionedPath}" "$@"`
const trampolinePath = Path.join(binPath, 'github')
return new Promise<void>((resolve, reject) => {
Fs.ensureDir(binPath, err => {

This comment was marked as spam.

This comment was marked as spam.

@shiftkey

Copy link
Copy Markdown
Member Author

🚚

@joshaber joshaber left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥜

Fs.ensureDir(binPath, err => {

return new Promise<void>((resolve, reject) => {
Fs.writeFile(trampolinePath, trampoline, err => {

This comment was marked as spam.

This comment was marked as spam.

@shiftkey

Copy link
Copy Markdown
Member Author

🌔

@joshaber
joshaber merged commit 3752691 into master Sep 20, 2017
@joshaber
joshaber deleted the make-cli-work-with-bash branch September 20, 2017 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants