check if we actually got repo info
This commit is contained in:
parent
e36a8e8a4e
commit
c9f27cbaa5
@ -4,8 +4,12 @@
|
||||
# https://gist.github.com/jrick/d47e1be98609401e86ba0bd6bfbfc8fe
|
||||
function got-push {
|
||||
local r
|
||||
r=$(got info | awk '$1 ~ "^repository:" {print $2}')
|
||||
r=$(set -e; got info | awk '$1 ~ "^repository:" {print $2}')
|
||||
if [ "$r" != "" ]; then
|
||||
(cd "$r" && git push "$@")
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
function got-sync {
|
||||
|
Loading…
Reference in New Issue
Block a user