Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/github_actions/actions/checkout-4
Browse files Browse the repository at this point in the history
  • Loading branch information
Zordrak authored Dec 19, 2023
2 parents 0d39389 + 641a4ef commit b4dff21
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,16 @@ git clone --depth=1 https://github.com/tfutils/tfenv.git ~/.tfenv

2. Add `~/.tfenv/bin` to your `$PATH` any way you like

bash:
```console
echo 'export PATH="$HOME/.tfenv/bin:$PATH"' >> ~/.bash_profile
```
zsh:
```console
$ echo 'export PATH="$HOME/.tfenv/bin:$PATH"' >> ~/.zprofile
```

For WSL users
For WSL users:
```bash
echo 'export PATH=$PATH:$HOME/.tfenv/bin' >> ~/.bashrc
```
Expand Down
6 changes: 3 additions & 3 deletions libexec/tfenv-install
Original file line number Diff line number Diff line change
Expand Up @@ -73,15 +73,15 @@ declare regex="${resolved##*\:}";

log 'debug' "Processing install for version ${version}, using regex ${regex}";

remote_version="$(tfenv-list-remote | grep -e "${regex}" | head -n 1)";
[ -n "${remote_version}" ] && version="${remote_version}" || log 'error' "No versions matching '${requested:-$version}' found in remote";

dst_path="${TFENV_CONFIG_DIR}/versions/${version}";
if [ -f "${dst_path}/terraform" ]; then
echo "Terraform v${version} is already installed";
exit 0;
fi;

remote_version="$(tfenv-list-remote | grep -e "${regex}" | head -n 1)";
[ -n "${remote_version}" ] && version="${remote_version}" || log 'error' "No versions matching '${requested:-$version}' found in remote";

case "$(uname -s)" in
Darwin*)
kernel="darwin";
Expand Down

0 comments on commit b4dff21

Please sign in to comment.