gruntwork-io / terragrunt

Terragrunt is a flexible orchestration tool that allows Infrastructure as Code written in OpenTofu/Terraform to scale.
https://terragrunt.gruntwork.io/
MIT License
8.1k stars 984 forks source link

No error message when Terraform isn't available #2223

Open marinalimeira opened 2 years ago

marinalimeira commented 2 years ago

When trying to execute any Terragrunt command in a path where Terraform isn't available, I get no error message:

❯ aws-vault exec sbox -- terragrunt apply --terragrunt-log-level debug --terragrunt-debug
DEBU[0000] Did not find any locals block: skipping evaluation.
DEBU[0000] Running command: terraform --version          prefix=[/Users/marina/go/src/github.com/gruntwork.io/testing123]
ERRO[0000] exit status 1

It should report terraform not found.

denis256 commented 2 years ago

Hi, I was wondering on which environment/Terragrunt version this happened, on my tests in Ubuntu / Terragrunt v0.38.6:

$ terragrunt apply --terragrunt-log-level debug --terragrunt-debug
DEBU[0000] Did not find any locals block: skipping evaluation. 
DEBU[0000] Running command: terraform --version          prefix=[/projects/gruntwork/terragrunt-tests/issue-2223] 
ERRO[0000] exec: "terraform": executable file not found in $PATH 
ERRO[0000] Unable to determine underlying exit code, so Terragrunt will exit with error code 1 
marinalimeira commented 2 years ago

I am on macOS 12.5 and terragrunt v0.38.6.

davidpellcb commented 1 year ago

I experienced this today with terragrunt v0.45.8

denis256 commented 1 year ago

Hi, can be shared more details about the environment:

Nmishin commented 5 months ago

yes, it will be very useful to have more informative error message