Skip to content

Commit

Permalink
Update tfenv-pin
Browse files Browse the repository at this point in the history
  • Loading branch information
Zordrak authored Aug 14, 2021
1 parent d3f39a8 commit 58299c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libexec/tfenv-pin
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ done;
[ "${#}" -ne 0 ] \
&& log 'error' "usage: tfenv pin"

[ -d "${TFENV_ROOT}/versions" ] \
[ -d "${TFENV_ROOT}/versions/" ] \
|| log 'error' 'No versions available. Please install one with: tfenv install'

[[ -x "${TFENV_ROOT}/versions" && -r "${TFENV_ROOT}/versions" ]] \
Expand All @@ -71,7 +71,7 @@ done;
version_name="$(tfenv-version-name 2>/dev/null || true)" \
&& log 'debug' "tfenv-version-name reported: ${version_name}";

echo $version_name >> .terraform-version;
echo "Pinned $version_name in current directory"
echo "${version_name}" > .terraform-version;
log 'info' "Pinned version by writing \"${version_name}\" to $(pwd)/.terraform-version";

exit 0;

0 comments on commit 58299c2

Please sign in to comment.