Presently, the CommandLine class runs the terraform commands using the default windows command line shell (cmd.exe). However, in Terraform 0.12, the windows command line shell doesn't work correctly when passing in names tfvar values. GitBash doesn't seem to have the same problems.
So, the proposed feature enhancement is as follows:
Default to GitBash on Windows if it's installed
First, use the system property gitBash for the location of the GitBash executable
Next, check the environment variable GIT_BASH for the location of the GitBash executable
Finally, if %HOMEDRIVE%%HOMEPATH%\\AppData\\Local\\Programs\\Git\\bin\\bash.exe exists, use that as the location for GitBash
If none of the above can determine the GitBash executable, assume that it isn't installed and default to the windows command line (cmd.exe).
Presently, the
CommandLine
class runs the terraform commands using the default windows command line shell (cmd.exe). However, in Terraform 0.12, the windows command line shell doesn't work correctly when passing in names tfvar values. GitBash doesn't seem to have the same problems.So, the proposed feature enhancement is as follows:
GIT_BASH
for the location of the GitBash executable%HOMEDRIVE%%HOMEPATH%\\AppData\\Local\\Programs\\Git\\bin\\bash.exe
exists, use that as the location for GitBash