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

Auto install disabled by default #153

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ Allow to override the default architecture for binaries downloading during insta

<details><summary><b>TENV_AUTO_INSTALL</b></summary><br>

String (Default: true)
String (Default: false)

If set to true **tenv** will automatically install missing tool versions needed.

Expand Down Expand Up @@ -681,18 +681,18 @@ Same as TENV_ARCH (compatibility with [tofuenv](https://github.com/tofuutils/tof
Same as TENV_AUTO_INSTALL (compatibility with [tofuenv](https://github.com/tofuutils/tofuenv)).

#### Example 1
Use OpenTofu version 1.6.1 that is not installed, and auto installation is disabled :
Use OpenTofu version 1.6.1 that is not installed, and auto installation stay disabled :

```console
$ TOFUENV_AUTO_INSTALL=false tenv use 1.6.1
$ tenv use 1.6.1
Written 1.6.1 in /home/dvaumoron/.tenv/OpenTofu/version
```

#### Example 2
Use OpenTofu version 1.6.0 that is not installed, and auto installation stay enabled :
Use OpenTofu version 1.6.0 that is not installed, and auto installation is enabled :

```console
$ tenv tofu use 1.6.0
$ TOFUENV_AUTO_INSTALL=true tenv tofu use 1.6.0
Installing OpenTofu 1.6.0
Fetching release information from https://api.github.com/repos/opentofu/opentofu/releases/tags/v1.6.0
Downloading https://github.com/opentofu/opentofu/releases/download/v1.6.0/tofu_1.6.0_linux_amd64.zip
Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func InitConfigFromEnv() (Config, error) {
arch = runtime.GOARCH
}

autoInstall, err := getenvBoolFallback(true, tenvAutoInstallEnvName, tofuAutoInstallEnvName, tfAutoInstallEnvName)
autoInstall, err := getenvBoolFallback(false, tenvAutoInstallEnvName, tofuAutoInstallEnvName, tfAutoInstallEnvName)
if err != nil {
return Config{}, err
}
Expand Down
Loading