File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ tfenv install
126126```
127127
128128The ` trust-tfenv ` directive means that verification uses a copy of the
129- Hashicorp OpenPGP key found in the tfenv repository. Skipping that directive
129+ Hashicorp OpenPGP key found in the tfenv repository. Skipping that directive
130130means that the Hashicorp key must be in the existing default trusted keys.
131131Use the file ` ${TFENV_INSTALL_DIR}/use-gnupg ` to instead invoke the full ` gpg ` tool and
132132see web-of-trust status; beware that a lack of trust path will not cause a
@@ -231,13 +231,19 @@ functionality will be restored.
231231TFENV_REVERSE_REMOTE=1 tfenv list-remote
232232```
233233
234- ##### ` TFENV_SKIP_LIST_REMOTE `
234+ ##### ` TFENV_SKIP_REMOTE_CHECK `
235235
236236Integer (Default: 0)
237237
238238When using a custom remote, such as Artifactory, lazy caching may be used meaning the versions
239239returned by the remote aren't the full list available (more can be pulled on demand). This option
240- disables the pre-install validation and will blindly pull the requested version from the remote.
240+ disables the pre-install validation and will blindly pull the requested version from the remote. When
241+ using ` latest ` as the specified version, this will still rely on the latest version returned from the
242+ configured remote.
243+
244+ ``` console
245+ TFENV_SKIP_REMOTE_CHECK=1 tfenv install 1.14.5
246+ ```
241247
242248##### ` TFENV_CONFIG_DIR `
243249
Original file line number Diff line number Diff line change @@ -73,8 +73,10 @@ declare regex="${resolved##*\:}";
7373
7474log ' debug' " Processing install for version ${version} , using regex ${regex} " ;
7575
76- remote_version=" $( tfenv-list-remote | grep -e " ${regex} " | head -n 1) " ;
77- [ -n " ${remote_version} " ] && version=" ${remote_version} " || log ' error' " No versions matching '${requested:- $version } ' found in remote" ;
76+ if [ " ${TFENV_SKIP_REMOTE_CHECK:- 0} " -eq 0 ]; then
77+ remote_version=" $( tfenv-list-remote | grep -e " ${regex} " | head -n 1) " ;
78+ [ -n " ${remote_version} " ] && version=" ${remote_version} " || log ' error' " No versions matching '${requested:- $version } ' found in remote" ;
79+ fi ;
7880
7981dst_path=" ${TFENV_CONFIG_DIR} /versions/${version} " ;
8082if [ -f " ${dst_path} /terraform" ]; then
You can’t perform that action at this time.
0 commit comments