Skip to content

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