Skip to content

Commit 4aca9a2

Browse files
committed
TERRAFORM envvar renamed to TERRAFORM_PATH
1 parent c621d59 commit 4aca9a2

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ It is recommended to use `$()` rather than `xargs` for `tf apply` or `tf destroy
8989

9090
For not recognized commands `tf` passes all arguments to `terraform` command.
9191

92-
`terraform` command might be replaced with another using `TERRAFORM`
92+
`terraform` command might be replaced with another using `TERRAFORM_PATH`
9393
environment variable, ie.:
9494

9595
```sh
96-
export TERRAFORM=opentf
96+
export TERRAFORM_PATH=opentf
9797
```
9898

9999
### `tf apply`

run/exec_terraform_command.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import (
55
"os/exec"
66
)
77

8-
var TERRAFORM = os.Getenv("TERRAFORM")
8+
var TERRAFORM_PATH = os.Getenv("TERRAFORM_PATH")
99

1010
func execTerraformCommand(arg ...string) *exec.Cmd {
11-
name := TERRAFORM
12-
if TERRAFORM == "" {
13-
name = "terraform"
11+
path := TERRAFORM_PATH
12+
if TERRAFORM_PATH == "" {
13+
path = "terraform"
1414
}
15-
return exec.Command(name, arg...)
15+
return exec.Command(path, arg...)
1616
}

0 commit comments

Comments
 (0)