rover icon indicating copy to clipboard operation
rover copied to clipboard

[Feature request] look for `terraform` in `$PATH`

Open SMillerDev opened this issue 4 years ago • 2 comments

If your terraform location isn't /usr/local/bin/terraform you have to specify your own location, which makes it inconvenient for people using Homebrew on new ARM based macs, and people using tfenv. Using the Unix standard $PATH would make it work correctly for most people.

SMillerDev avatar Oct 07 '21 07:10 SMillerDev

Cautiously optimistic that ExecPath() will allow me to get the path of the Terraform binary

Otherwise, we would need to go through every directory in $PATH to determine whether the Terraform binary exists there before using it

im2nguyen avatar Nov 04 '21 03:11 im2nguyen

@im2nguyen As mentioned in #45, rover -tfPath terraform seems to work, which means you should be able to change https://github.com/im2nguyen/rover/blob/ba50369b5b86ff1c87c2dc9a29a88c7efa72a4df/main.go#L66 to:

	flag.StringVar(&tfPath, "tfPath", "terraform", "Path to Terraform binary")

ADTC avatar Nov 26 '21 07:11 ADTC