motemen/ghq — pull request #45 by k0kubun (2014-10-20 16:44:03+00:00)
Title: Return exit status 1 for clone failure

I want to write a script which switches its behavior depending on `ghq get`'s result.
But currently `ghq get` returns 0 even if it fails. So I changed the exit status to 1.

## before
```
$ ghq get foo/bar; echo $?
clone https://github.com/foo/bar -> /Users/k0kubun/src/github.com/foo/bar
git clone https://github.com/foo/bar /Users/k0kubun/src/github.com/foo/bar
Cloning into '/Users/k0kubun/src/github.com/foo/bar'...
remote: Repository not found.
fatal: repository 'https://github.com/foo/bar/' not found
0
```

## after
```
$ ghq get foo/bar; echo $?
clone https://github.com/foo/bar -> /Users/k0kubun/src/github.com/foo/bar
git clone https://github.com/foo/bar /Users/k0kubun/src/github.com/foo/bar
Cloning into '/Users/k0kubun/src/github.com/foo/bar'...
remote: Repository not found.
fatal: repository 'https://github.com/foo/bar/' not found
error Could not find repository: /usr/bin/git: exit status 128
1
```