Skip to content

Commit

Permalink
Fix a bug that causes gister to fail if no token.
Browse files Browse the repository at this point in the history
There is a bug that if a user did not have  a token already, gister would fail.
Thanks to wenLiangcan.
  • Loading branch information
weakish committed Nov 2, 2013
1 parent 78b3f16 commit 99bbbec
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions gister.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@

## Versions

semver='2.0.2' # released on 2013-11-1
semver='2.0.3-alpha' # released on 2013-11-3

# semver='2.0.2' # released on 2013-11-1
# Yet another hotfix version.
# - remove confusing error message
# - init() does not get oauth2 token if already exist.
Expand Down Expand Up @@ -97,14 +99,15 @@ END
}

main() {
set -e
gisthome=${GIST_HOME:=`git config --get gist.home`}
if test -f $HOME/.gist; then
github_oauth_token=`cat $HOME/.gist`
else
echo 'You need a github oauth2 token.'
fi

set -e

case $1 in
help) help;;
fetchall) fetchall;;
Expand Down

0 comments on commit 99bbbec

Please sign in to comment.