-
-
Notifications
You must be signed in to change notification settings - Fork 1k
4211 - fix: Setting correct exit code for hcl validate
#4290
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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
|
40100a4
to
1a9fb1d
Compare
Description
Fixes #4211.
Returns a final error for
hcl validate
so that it users can check the overall exit code.This is technically a breaking change, but I would advocate that we release this as part of a minor release instead of going through a full strict control process. It should be pretty simple to address, and it's typical behavior of linting tools, etc.
TODOs
Read the Gruntwork contribution guidelines.
Release Notes (draft)
Added error for overall exit code to be non-zero if any of the files are invalid in
hcl validate
command.Migration Guide
If users were previously using
hcl validate
expecting a zero exit code, they'll need to suppress the exit code using something like|| true
in their scripts. This is because the command now returns a non-zero exit code if any of the files are invalid.