Skip to content

Commit

Permalink
Merge pull request #256 from dxw/fix-update-script-attempting-setup-a…
Browse files Browse the repository at this point in the history
…ccess-early

Fix update script attempting setup access early
  • Loading branch information
Stretch96 authored Mar 8, 2024
2 parents ba671a6 + 6ee1601 commit 80039a8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bin/configure-commands/update
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ usage() {
exit 1
}

GIT_AUTH_TOKEN="$(jq -r '.dalmatian_update_github_token' < "$CONFIG_SETUP_JSON_FILE")"
FORCE_UPDATE=0
UNAUTHENTICATED=0
GIT_AUTH_TOKEN=""
while getopts "g:fUh" opt; do
case $opt in
g)
Expand All @@ -36,6 +36,14 @@ while getopts "g:fUh" opt; do
esac
done

if [[
"$UNAUTHENTICATED" == 0 &&
-z "$GIT_AUTH_TOKEN"
]]
then
GIT_AUTH_TOKEN="$(jq -r '.dalmatian_update_github_token' < "$CONFIG_SETUP_JSON_FILE")"
fi

log_info -l "Checking for newer version ..." -q "$QUIET_MODE"
if [ -n "$GIT_AUTH_TOKEN" ]
then
Expand Down

0 comments on commit 80039a8

Please sign in to comment.