Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Adding right err message instead of exit code for the git pull-request --fetch #261

Merged
merged 1 commit into from
Mar 18, 2014

Conversation

henvic
Copy link
Member

@henvic henvic commented Mar 11, 2014

This pull request makes gh more verbose by copying the stderr (standard error) to the cli instead of simply failing silently.

For example:

$ gh pr -n 2 -u eduardolundgren --fetch
gh [info] Fetching pull request #2 into branch pr-2
gh [error] fatal: Refusing to fetch into current branch refs/heads/pr-2 of non-bare repository
fatal: The remote end hung up unexpectedly

instead of

$ gh pr -n 2 -u eduardolundgren --fetch
gh [info] Fetching pull request #2 into branch pr-2
gh [error] 128

@zenorocha
Copy link
Contributor

Is this related to #126?

@zenorocha
Copy link
Contributor

Just started reviewing :)

:octocat: Sent from GH.

@zenorocha
Copy link
Contributor

It worked! Thanks @henvic :)

P.S.: To simulate this issue you need to fetch a PR into an existing local branch.

@zenorocha
Copy link
Contributor

Thank you, pull request merged!

:octocat: Sent from GH.

@zenorocha zenorocha merged commit 3eacd76 into node-gh:master Mar 18, 2014
@henvic henvic deleted the improve-error-messages branch March 18, 2014 18:35
@zenorocha zenorocha added this to the 1.8.3 milestone Mar 18, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants