File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -798,8 +798,7 @@ _check_credentials() {
798
798
printf " %b" " If you have a refresh token generated, then type the token, else leave blank and press return key..\n\nRefresh Token: "
799
799
read -r REFRESH_TOKEN && REFRESH_TOKEN=" ${REFRESH_TOKEN// [[:space:]]/ } "
800
800
if [[ -n ${REFRESH_TOKEN} ]]; then
801
- _get_token_and_update &&
802
- _update_config REFRESH_TOKEN " ${REFRESH_TOKEN} " " ${CONFIG} "
801
+ _get_token_and_update && _update_config REFRESH_TOKEN " ${REFRESH_TOKEN} " " ${CONFIG} "
803
802
else
804
803
printf " \nVisit the below URL, tap on allow and then enter the code obtained:\n"
805
804
URL=" https://accounts.google.com/o/oauth2/auth?client_id=${CLIENT_ID} &redirect_uri=${REDIRECT_URI} &scope=${SCOPE} &response_type=code&prompt=consent"
@@ -810,7 +809,7 @@ _check_credentials() {
810
809
--data " code=${CODE} &client_id=${CLIENT_ID} &client_secret=${CLIENT_SECRET} &redirect_uri=${REDIRECT_URI} &grant_type=authorization_code" " ${TOKEN_URL} " ) " || :
811
810
812
811
REFRESH_TOKEN=" $( _json_value refresh_token 1 1 <<< " ${RESPONSE}" ) "
813
- _get_token_and_update " ${RESPONSE} "
812
+ _get_token_and_update " ${RESPONSE} " && _update_config REFRESH_TOKEN " ${REFRESH_TOKEN} " " ${CONFIG} "
814
813
else
815
814
printf " \n"
816
815
_print_center " normal" " No code provided, run the script and try again" " " 1>&2
You can’t perform that action at this time.
0 commit comments