diff --git a/libexec/tfenv-install b/libexec/tfenv-install index d13b384..022dc44 100755 --- a/libexec/tfenv-install +++ b/libexec/tfenv-install @@ -73,8 +73,10 @@ 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"; +if [ "${TFENV_SKIP_LIST_REMOTE:-0}" -eq 0 ]; then + 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"; +fi dst_path="${TFENV_CONFIG_DIR}/versions/${version}"; if [ -f "${dst_path}/terraform" ]; then