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

Return Exit Code 1 on Failure #86

Merged
merged 2 commits into from
Jul 25, 2024
Merged

Conversation

gcs278
Copy link
Contributor

@gcs278 gcs278 commented Jul 19, 2024

Previously, the code returned exit code 0 even when the template generation failed. Now, if an error occurs, the program will return exit code 1.

Additionally, silence errors from cobra execution. Previously, Cobra was printing non-formatted errors. However, we already log these errors via zap. This fix silences Cobra from printing redundant logs.

Copy link

cla-checker-service bot commented Jul 19, 2024

💚 CLA has been signed

@gcs278
Copy link
Contributor Author

gcs278 commented Jul 19, 2024

I think there is a bug in the CLA https://www.elastic.co/contributor-agreement agreement. It just takes me to blank page when I try to "sign agreement".

@thbkrkr
Copy link
Contributor

thbkrkr commented Jul 22, 2024

I think there is a bug in the CLA https://www.elastic.co/contributor-agreement agreement. It just takes me to blank page when I try to "sign agreement".

Strange, did you wait enough?

Can you reach docusign.net?

curl -sSL --connect-timeout 3 https://powerforms.docusign.net/ -o /dev/null -w '{"url":"%{url_effective}","status":"%{http_code}","time":"%{time_total}"}\n'

{"url":"https://powerforms.docusign.net/","status":"200","time":"0.616382"}

You should see a document to sign loaded from docusign.net using an <iframe>?

@thbkrkr
Copy link
Contributor

thbkrkr commented Jul 24, 2024

@gcs278 Could you try signing the agreement again?

@gcs278
Copy link
Contributor Author

gcs278 commented Jul 25, 2024

Sorry, I didn't wait long enough, also rebased.

gcs278 added 2 commits July 24, 2024 20:09
Previously, Cobra was printing non-formatted errors. However, we
already log these errors via zap. This fix silences Cobra from printing
redundant logs.
Previously, the code returned exit code 0 even when the template
generation failed. Now, if an error occurs, the program will return
exit code 1.
@thbkrkr thbkrkr merged commit 9e0eec8 into elastic:master Jul 25, 2024
2 checks passed
@thbkrkr thbkrkr added the enhancement New feature or request label Jul 25, 2024
@thbkrkr
Copy link
Contributor

thbkrkr commented Jul 25, 2024

Thank you for this contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants