-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Fix invalid command should not show terraform help #889
Fix invalid command should not show terraform help #889
Conversation
📝 WalkthroughWalkthroughThe pull request modifies the Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Tip CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
cmd/terraform.go (1)
41-41
: Correct the spelling of “Unknkown”.It should be spelled “Unknown” in both the error message and printed string.
- fmt.Printf(`Error: Unknkown command %q for %q`+"\n", args[0], cmd.CommandPath()) + fmt.Printf(`Error: Unknown command %q for %q`+"\n", args[0], cmd.CommandPath())
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
cmd/terraform.go
(4 hunks)
🔇 Additional comments (2)
cmd/terraform.go (2)
21-21
: Good change to RunE
.
Switching from Run
to RunE
allows for better error handling. This aligns with the PR’s objective to provide a clearer error message and more robust reporting.
56-56
: Consistent return ensures proper run lifecycle.
Using return nil
here complies with the RunE
signature, signaling successful execution and preventing help output for invalid commands.
Won't this depend on: |
issue: https://linear.app/cloudposse/issue/DEV-2894/atmos-terraform-asdfasdf-should-show-error-message-instead-of-help
what
We will now show error message if the command is invalid like:
After Merge atmos specific and terraform help documentation #857 we would be getting rid of the help content that is seen above the error.
This would then look like:
why
This was not consistent with
references
Summary by CodeRabbit
New Features
terraformCmd
command, providing clearer feedback for command usage.Bug Fixes