Skip to content
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

Improve error handling of incorrectly used flags #3836

Open
yhakbar opened this issue Feb 4, 2025 · 0 comments
Open

Improve error handling of incorrectly used flags #3836

yhakbar opened this issue Feb 4, 2025 · 0 comments
Labels
bug Something isn't working cli-redesign Issues related to the CLI Redesign preserved Preserved issues never go stale

Comments

@yhakbar
Copy link
Collaborator

yhakbar commented Feb 4, 2025

When a flag is used on the wrong Terragrunt command, users should be given guidance on the best way to address it.

$terragrunt --experiment cli-redesign --terragrunt-out-dir /tmp/plan  run  -- plan
19:11:55.541 ERROR  OpenTofu has no command named "/tmp/plan". To see all of OpenTofu's top-level commands, run: tofu -help

We should do a preliminary assessment of potentially misused flags and surface a better error so that users know how to recover more easily.

e.g.

$terragrunt --experiment cli-redesign --terragrunt-out-dir /tmp/plan  run  -- plan
19:11:55.541 ERROR  flag --terragrunt-out-dir is not a valid flag for plan. Did you mean to use 'run-all plan'?

Blocked by #3723

@yhakbar yhakbar added bug Something isn't working cli-redesign Issues related to the CLI Redesign preserved Preserved issues never go stale labels Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli-redesign Issues related to the CLI Redesign preserved Preserved issues never go stale
Projects
None yet
Development

No branches or pull requests

1 participant