for some reason, command tgenv-install sometimes fails on curl command, resulting in Tarball download failed.
although the operation failed, the terragrunt folder inside versions is still created, therefore causing a bug when trying to retry the tgenv-install command.
The Fix
added a check after CURL to check exit status (assuming it was not 0 when failed)
if its not 0 - remove terragrunt folder so that we can retry the command again.
The Issue
for some reason, command tgenv-install sometimes fails on curl command, resulting in
Tarball download failed
. although the operation failed, the terragrunt folder inside versions is still created, therefore causing a bug when trying to retry the tgenv-install command.The Fix
added a check after CURL to check exit status (assuming it was not 0 when failed) if its not 0 - remove
terragrunt
folder so that we can retry the command again.