check if we actually got repo info

This commit is contained in:
Aaron Bieber 2020-09-15 18:33:51 +00:00
parent e36a8e8a4e
commit c9f27cbaa5

View File

@ -4,8 +4,12 @@
# https://gist.github.com/jrick/d47e1be98609401e86ba0bd6bfbfc8fe
function got-push {
local r
r=$(got info | awk '$1 ~ "^repository:" {print $2}')
(cd "$r" && git push "$@")
r=$(set -e; got info | awk '$1 ~ "^repository:" {print $2}')
if [ "$r" != "" ]; then
(cd "$r" && git push "$@")
else
return 1
fi
}
function got-sync {