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

Improve error code when using tfenv list before a version has been selected for the first time #187

Closed
jon-flowers opened this issue Jun 4, 2020 · 0 comments · Fixed by #236
Assignees
Labels

Comments

@jon-flowers
Copy link

Hello,
I found after first installing this that you can get into an error scenario early on. The tfenv list command is meant to show all available local versions. However, if you follow a certain path in the initial setup, this command will only give you an error, one which may not be as clear as it should be.

Steps to Reproduce:

  1. Install tfenv
  2. tfenv install <any version>
  3. Terraform version installs as expected
  4. tfenv list
  5. You receive an error: "cat: /usr/local/Cellar/tfenv/2.0.0/version: No such file or directory
    Version could not be resolved (set by /usr/local/Cellar/tfenv/2.0.0/version or tfenv use )
    tfenv-version-name failed"

This is obviously happening because the version file has not been created yet, because I have not entered tfenv use <version> for the first time after installing my first TF version. However, while the terminal log does say To make this your default version, run 'tfenv use <version>' after installing a new version, it's not clear that you have to do this at least once before you can even list what versions you have.

While this is a relatively "beginner" error, the wording of the errors did not immediately point me to the error. Instead, I initially assumed my tfenv package was corrupted and so re-installed it.

If entering tfenv use <version> at least once is required before the tfenv list command can be used at all, then it may at least be helpful to make either the error messages or the initial steps in the documentation clearer so that others aren't confused by this in the future.

Thanks!

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

Successfully merging a pull request may close this issue.

2 participants