cunymatthieu / tgenv

Terragrunt version manager
MIT License
223 stars 70 forks source link

fix tgenv install when installing existing version of terragrunt #41

Closed austinguo550 closed 2 years ago

austinguo550 commented 2 years ago

This PR fixes tgenv install when installing an existing version of terragrunt. When we run tgenv install it used to always hit the remote github API and cause us to reach the rate limit. Instead, if terragrunt version already exists in tgenv versions, we bypass unauthorized github request and just do a simple switch instead

Test plan: run locally, we see that already installed versions will work

tgenv install 0.35.13
Terragrunt v0.35.13 is already installed
[INFO] Switching to v0.35.13
[INFO] Switching completed

ran some of the other tests to ensure they still work for regression testing - some of them were broken on the master anyway so not putting a ton of effort into this repo, the change is simple enough