-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Plugin executables are looked up via $PATH
#157
Comments
I disagree with this request. Let unix work the way unix does and if you prefer the executable to search the directory of terraform, then add that to the path and your good to go. No need to make the executable more complicated when all the necessary tools are already at your disposal. export PATH=$(dirname $(which terraform)):$PATH is all you need if you want to ensure that the dirrectory that terraform is in is searched first in your path. Or of course you can hardcode it in your .profile or wherever. |
I see your point - using both same-directory and |
Hm. We've been using the PATH then same directory approach for some time in Packer without issue (and Terraform inherits that codebase for plugins). But I think I agree with @alekstorm that we should look in the same directory first. For reference: Line 182 in 1244bff
|
Is Terraform currently loading |
FYI @mitchellh, I just ported packer code in terraform to load |
Fixed. I also made it so that the directory and PATH are only looked up if the executable contains a path separator. This allows for absolute paths without wasting time. |
Currently, the
terraform
executable finds its plugin executables (e.g.terraform-provider-aws
) via thePATH
variable on *nix, which results in surprising behavior when the user is trying to run aterraform
executable in a non-standard location. I thinkterraform
should first look for the plugins next to it in its current directory before resorting toPATH
.The text was updated successfully, but these errors were encountered: