Skip to content

Commit

Permalink
Bail early if refresh token is not found (#363)
Browse files Browse the repository at this point in the history
* Bail early if refresh token is not found

* fix bash syntax
  • Loading branch information
changusmc authored Dec 10, 2021
1 parent 5766c06 commit b1d7e3d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions generate-ci-auth-file
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail

if [[ -z "${REFRESH_TOKEN}" ]]; then
echo "REFRESH_TOKEN is not set. If this is running in CI, it's because secrets are not passed to forks."
exit 2;
fi

curl https://api.dropbox.com/oauth2/token \
-d grant_type=refresh_token \
-d refresh_token=$REFRESH_TOKEN \
Expand Down

0 comments on commit b1d7e3d

Please sign in to comment.