Skip to content

Commit

Permalink
migrates from tfenv to tenv
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Gohlke committed Nov 21, 2024
1 parent 2c4a5e7 commit ddce28a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/terraform.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/bin/bash

if ! command -v terraform >/dev/null; then
echo "install terraform via tfenv"
brew install tfenv
echo "install terraform via tenv"
brew install tenv
# install latest
tfenv install latest && tfenv use
tenv tf install latest && tenv tf use latest
fi

if [[ -d ~/.config/topgrade ]] && ! [[ -f ~/.config/topgrade/tfenv.toml ]] && ! command -v topgrade >/dev/null; then
cat << EOF > ~/.config/topgrade/tfenv.toml
if [[ -d ~/.config/topgrade ]] && ! [[ -f ~/.config/topgrade/tenv.toml ]] && ! command -v topgrade >/dev/null; then
cat << EOF > ~/.config/topgrade/tenv.toml
[commands]
"Terraform: tfenv" = "tfenv install latest && tfenv use"
"Terraform: tenv" = "tenv tf install latest && tfenv tf use latest"
EOF
fi

Expand Down

0 comments on commit ddce28a

Please sign in to comment.