@@ -31,29 +31,24 @@ runs:
3131 echo "${yellow}${bold}Authenticate org 🔒${reset}"
3232 echo "${yellow}${bold}------------------------------------------------------------------------------------------${reset}"
3333
34- command=(sf org login sfdx-url --sfdx-url-stdin --alias ${ALIAS})
34+ command=(sf org login sfdx-url --sfdx-url-stdin --json -- alias ${ALIAS})
3535
36- if [ "${SET_DEFAULT_USERNAME}" == "true" ];
37- then
38- command+=(--set-default)
36+ if [ "${SET_DEFAULT_USERNAME}" == "true" ]; then
37+ command+=(--set-default)
3938 fi
4039
41- if [ "${SET_DEFAULT_DEVHUB_USERNAME}" == "true" ];
42- then
43- command+=(--set-default-dev-hub)
40+ if [ "${SET_DEFAULT_DEVHUB_USERNAME}" == "true" ]; then
41+ command+=(--set-default-dev-hub)
4442 fi
4543
46- command+=(-- json)
44+ echo "${AUTH_URL}" | "${ command[@]}" > loginResult. json
4745
48- echo "${AUTH_URL}" | "${command[@]}" > loginResult.json
49-
50- if [ "$(jq .status loginResult.json)" -eq 1 ];
51- then
52- echo "::error title=Failed to authenticate::$(jq .message loginResult.json)"
53- rm -f ./loginResult.json
54- exit 1
46+ if [ "$(jq .status loginResult.json)" -eq 1 ]; then
47+ echo "::error title=Failed to authenticate::$(jq .message loginResult.json)"
48+ rm -f ./loginResult.json
49+ exit 1
5550 else
56- echo "${green}${bold}Authenticate org successful.${reset}"
51+ echo "${green}${bold}Authenticate org successful.${reset}"
5752 fi
5853
5954 echo "${yellow}${bold}------------------------------------------------------------------------------------------${reset}"
0 commit comments