Skip to content

Commit

Permalink
Merge pull request #16 from vtex/add-another-check
Browse files Browse the repository at this point in the history
chore: 🤖 added one more check on login step
  • Loading branch information
thyarles authored Sep 27, 2022
2 parents 90c6a1b + 198b4fc commit 362c2c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ WRK_JSON="workspace.json"
ACC="$VTEX_ACCOUNT"
KEY="$VTEX_APP_KEY"
TKN="$VTEX_APP_TOKEN"
LOG="Logged into"

WRK=${VTEX_WORKSPACE:-master}
BIN=${VTEX_BIN:-vtex}
Expand Down Expand Up @@ -74,7 +75,7 @@ if [[ $AUT == 'true' ]]; then

# Test to test authentication
print "Checking authentication"
CHECK=$($BIN whoami | grep $ACC) || error "Something very odd happened, sorry about that" 9
CHECK=$($BIN whoami --verbose | grep "$ACC" | grep "$LOG" ) || error "Authentication failed, check your credentials!" 9
[[ -n $CHECK ]] && print ok || error "failed login" 10
echo $CHECK
else
Expand Down

0 comments on commit 362c2c0

Please sign in to comment.