Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
thyarles authored Oct 21, 2022
1 parent 1034d9a commit 837e255
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,16 @@ echo "::endgroup::"
if [[ $AUT == 'true' ]]; then

# Clean previous login if any
rm -rf $HOME/.vtex &> /dev/null || print "Delete '$HOME/.vtex' failed"

ERR=0; rm -rf $HOME/.vtex &> /dev/null || ERR=1
if [[ $ERR -eq 1 ]]; then
print "Delete '$HOME/.vtex' failed"
print "Trying to delete inside files"
rm -rf $HOME/.vtex/* &> /dev/null || print "Delete '$HOME/.vtex/*' failed"
fi

# Check if the toolbelt is installed and working
echo "::group::whoami"
$BIN whoami &> /dev/null || error "$BIN not installed" 4
$BIN whoami || error "$BIN not installed" 4
echo "::endgroup::"

# Get token
Expand Down

0 comments on commit 837e255

Please sign in to comment.