summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/gitget/gitget8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gitget/gitget b/src/gitget/gitget
index 7bdb9c9..7a0f0bf 100755
--- a/src/gitget/gitget
+++ b/src/gitget/gitget
@@ -74,8 +74,8 @@ download_git_checkout() {
if $FORCE; then
git config remote.origin.pushUrl "$push"
else
- local curpush="$(git config --get remote.origin.pushUrl)"
- if [[ $? != 0 ]] ; then
+ local curpush
+ if ! curpush="$(git config --get remote.origin.pushUrl)"; then
error "%s does not have a %s configured" pushUrl "$name"
plain "Aborting..."
exit 1
@@ -128,8 +128,8 @@ download_git_bare() {
if $FORCE; then
git config remote.origin.pushUrl "$push"
else
- local curpush="$(git config --get remote.origin.pushUrl)"
- if [[ $? != 0 ]] ; then
+ local curpush
+ if ! curpush="$(git config --get remote.origin.pushUrl)"; then
error "%s does not have a %s configured" pushUrl "$name"
plain "Aborting..."
exit 1