Skip to content

Fix error handling #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hokaccha
Copy link

@hokaccha hokaccha commented Jul 3, 2014

When I have some remote urls, gh-open outputs error message as below:

$ git remote -v
dev     [email protected]:myapp-dev.git (fetch)
dev     [email protected]:myapp-dev.git (push)
heroku  [email protected]:myapp.git (fetch)
heroku  [email protected]:myapp.git (push)
origin  [email protected]:hokaccha/myapp.git (fetch)
origin  [email protected]:hokaccha/myapp.git (push)

$ gh-open .
remote:dev, unsupported remote url: [email protected]:adventar-dev.git
remote:dev, unsupported remote url: [email protected]:adventar-dev.git
remote:heroku, unsupported remote url: [email protected]:adventar.git
remote:heroku, unsupported remote url: [email protected]:adventar.git
# opening github url is successful

This patch fixes the error handling.

# there are github and heroku urls.
$ git remote -v
dev     [email protected]:myapp-dev.git (fetch)
dev     [email protected]:myapp-dev.git (push)
heroku  [email protected]:myapp.git (fetch)
heroku  [email protected]:myapp.git (push)
origin  [email protected]:hokaccha/myapp.git (fetch)
origin  [email protected]:hokaccha/myapp.git (push)

$ gh-open .
# only opening github url
# there is no github url
$ git remote -v
heroku  [email protected]:myapp.git (fetch)
heroku  [email protected]:myapp.git (push)

$ gh-open .
Error: No such GitHub remote url.
# there is no remote url.
$ git remote -v

$ gh-open .
Error: No such GitHub remote url.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant