Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying LIST_URL also updates REMOTE_URL #312

Open
orbitz opened this issue Dec 27, 2024 · 1 comment
Open

Specifying LIST_URL also updates REMOTE_URL #312

orbitz opened this issue Dec 27, 2024 · 1 comment

Comments

@orbitz
Copy link

orbitz commented Dec 27, 2024

Describe the bug
If you specify a *_LIST_URL tenv will also use that URL to modify the *_REMOTE_URL when downloading. This means that you cannot separate listing from downloading. For example, I specifying TF_LIST_URL to https://somewhere/api/github/tenv/gruntwork-io/terragrunt/releases/ and tenv tries to then download the chosen release from https/somewhere/api/github/tenv/gruntwork-io/terragrunt/releases/gruntwork-io/terragrunt/releases/download/v0.69.3/terragrunt_linux_amd64, which is clearly incorrect.

You can work around this by specifying both URLs, but the issue is that it means you cannot let LIST do its thing and say WHERE to download the release from, sort of defeating the purpose.

To Reproduce
Steps to reproduce the behavior:

  1. Specify *_LIST_URL env variable.
  2. Perform an operation using the CLI for the tool you specified the URL.
  3. Observe that download fails due to the LIST URL being used as the head of download.

Expected behavior
I would expect the LIST_URL to only be used for listing the downloads and then use the URL specified in the download for downloading.

Screenshots
Now screenshot

Environment (please complete the following information):

  • OS: Linux
  • tofuenv version: 3.2.10

Additional context
I believe this comes from:

https://github.com/tofuutils/tenv/blob/main/config/remote.go#L122-L128

@dvaumoron
Copy link
Contributor

TFENV_INSTALL_MODE=direct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants