Skip to content

Commit

Permalink
Merge pull request #21 from vtex/fix-rm-deletion-error
Browse files Browse the repository at this point in the history
Update entrypoint.sh
  • Loading branch information
thyarles authored Oct 21, 2022
2 parents 2de8b4f + 837e255 commit 289bfa1
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

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 289bfa1

Please sign in to comment.