Yleisradio / chtf

Terraform version switcher with automatic install
MIT License
21 stars 4 forks source link

unable to install new terraform versions #11

Closed jsugarman closed 3 years ago

jsugarman commented 3 years ago

Its probably my environment, as I have not done this for a while, but I am unable to use chtf to install new terrarform versions

$ chtf 0.14.7
chtf: Installing Terraform version 0.14.7
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
Updated 2 formulae.
==> Updated Casks
Updated 1 cask.

Error: Unknown command: cask

I can however install the version myself, which resolves it for me

brew install [--cask] terraform-0.14.7

My environment:

jsugarman commented 3 years ago

Turns out it was because I had updated to chtf version 2.1.1 but not amended my .bashrc to remove the following

# Source chtf
# if [[ -f /usr/local/opt/chtf/share/chtf/chtf.sh ]]; then
#   source /usr/local/opt/chtf/share/chtf/chtf.sh
# fi
if [[ -f /usr/local/share/chtf/chtf.sh ]]; then
  source /usr/local/share/chtf/chtf.sh
fi

Once I removed/commented-out the original source location then it meant I was really using 2.1.1, which then installed new versions successfully.

Closing...

tmatilai commented 3 years ago

Hi Joel, The issue is fixed by #8 and released in chtf version 2.1.1. So time to upgrade 😀

Depends how you have installed chtf, but best guess is that brew install chtf would be enough to upgrade. Note that you also need to reload it, for example by starting new shell session.

In case of problems and if the instructions in the readme are not sufficient, please ask for help here.

jsugarman commented 3 years ago

Hi Joel, The issue is fixed by #8 and released in chtf version 2.1.1. So time to upgrade 😀

Depends how you have installed chtf, but best guess is that brew install chtf would be enough to upgrade. Note that you also need to reload it, for example by starting new shell session.

In case of problems and if the instructions in the readme are not sufficient, please ask for help here.

Many thanks for the swift response. I closed just prior as I worked out the issue was my .bashrc 😂