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.09k stars 981 forks source link

User-friendly error for invalid envs/flags #3414

Closed levkohimins closed 2 months ago

levkohimins commented 2 months ago

Description

Fixes #3407.

TODOs

Read the Gruntwork contribution guidelines.

Release Notes (draft)

Added / Removed / Updated [X].

Migration Guide

levkohimins commented 2 months ago

I'm not good at Golang. This will result in errors.Is returning true, right?

Exactly, that's why I added Unwrap() error

https://github.com/gruntwork-io/terragrunt/blob/cb32d540521ca681b28f62852a5f86afade55161/pkg/cli/errors.go#L102-L104

levkohimins commented 2 months ago

@yhakbar, thanks for the review!