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

Terraform 0.13.0 support #191

Merged
merged 4 commits into from
Jan 30, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,20 +386,20 @@ If you put a `.terraform-version` file on your project root, or in your home dir
$ cat .terraform-version
0.6.16

$ terraform --version
$ terraform version
Terraform v0.6.16

Your version of Terraform is out of date! The latest version
is 0.7.3. You can update by downloading from www.terraform.io

$ echo 0.7.3 > .terraform-version

$ terraform --version
$ terraform version
Terraform v0.7.3

$ echo latest:^0.8 > .terraform-version

$ terraform --version
$ terraform version
Terraform v0.8.8
```

Expand Down
4 changes: 2 additions & 2 deletions lib/helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ export -f curlw;

check_active_version() {
local v="${1}";
[ -n "$(${TFENV_ROOT}/bin/terraform --version | grep -E "^Terraform v${v}((-dev)|( \([a-f0-9]+\)))?$")" ];
[ -n "$(${TFENV_ROOT}/bin/terraform version | grep -E "^Terraform v${v}((-dev)|( \([a-f0-9]+\)))?$")" ];
}
export -f check_active_version;

check_installed_version() {
local v="${1}";
local bin="${TFENV_ROOT}/versions/${v}/terraform";
[ -n "$(${bin} --version | grep -E "^Terraform v${v}((-dev)|( \([a-f0-9]+\)))?$")" ];
[ -n "$(${bin} version | grep -E "^Terraform v${v}((-dev)|( \([a-f0-9]+\)))?$")" ];
};
export -f check_installed_version;

Expand Down
4 changes: 2 additions & 2 deletions libexec/tfenv-use
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ if [ "${version_file}" != "$(tfenv-version-file)" ]; then
log 'warn' "Default version file overridden by $(tfenv-version-file), changing the default version has no effect";
fi;

terraform --version 1>/dev/null \
|| log 'error' "'terraform --version' failed. Something is seriously wrong";
terraform version 1>/dev/null \
|| log 'error' "'terraform version' failed. Something is seriously wrong";
log 'info' "Switching completed";