typester/gh-open — pull request #2 by hokaccha (2014-07-03 01:04:39+00:00)
Title: Fix error handling

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

```
$ git remote -v
dev git@heroku.com:myapp-dev.git (fetch)
dev git@heroku.com:myapp-dev.git (push)
heroku git@heroku.com:myapp.git (fetch)
heroku git@heroku.com:myapp.git (push)
origin git@github.com:hokaccha/myapp.git (fetch)
origin git@github.com:hokaccha/myapp.git (push)

$ gh-open .
remote:dev, unsupported remote url: git@heroku.com:adventar-dev.git
remote:dev, unsupported remote url: git@heroku.com:adventar-dev.git
remote:heroku, unsupported remote url: git@heroku.com:adventar.git
remote:heroku, unsupported remote url: git@heroku.com:adventar.git
# opening github url is successful
```

This patch fixes the error handling.

```
# there are github and heroku urls.
$ git remote -v
dev git@heroku.com:myapp-dev.git (fetch)
dev git@heroku.com:myapp-dev.git (push)
heroku git@heroku.com:myapp.git (fetch)
heroku git@heroku.com:myapp.git (push)
origin git@github.com:hokaccha/myapp.git (fetch)
origin git@github.com:hokaccha/myapp.git (push)

$ gh-open .
# only opening github url
```

```
# there is no github url
$ git remote -v
heroku git@heroku.com:myapp.git (fetch)
heroku git@heroku.com: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.
```