summaryrefslogtreecommitdiffstats
path: root/g
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-10-26 10:20:22 +0100
committerMiklos Vajna <vmiklos@collabora.com>2020-10-26 11:03:32 +0100
commit3859ca31198b13c02375296c7299d1e9839d372e (patch)
tree86f7b37c68c64809b1171a4062f5a46eedc84a43 /g
parentDocumentBroker::saveToStorage: guard against nullptr _storage (diff)
downloadonline-3859ca31198b13c02375296c7299d1e9839d372e.tar.gz
online-3859ca31198b13c02375296c7299d1e9839d372e.zip
g review: check if 'gh' is authenticated already
Signed-off-by: Miklos Vajna <vmiklos@collabora.com> Change-Id: I689348489f89d74b10782302d7bea57a845e36d4
Diffstat (limited to 'g')
-rwxr-xr-xg5
1 files changed, 5 insertions, 0 deletions
diff --git a/g b/g
index 67b5955dc6..3424c6ea36 100755
--- a/g
+++ b/g
@@ -16,6 +16,11 @@ if [ "$1" == "review" ]; then
exit 1
fi
+ if ! gh auth status &>/dev/null; then
+ echo "'gh' thinks you are not logged into any GitHub hosts. Run 'gh auth login' to authenticate."
+ exit 1
+ fi
+
# e.g. co-4-2
BRANCH=$(git symbolic-ref HEAD|sed 's|refs/heads/||')
# e.g. origin