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 non zero exit code on errors for clean-svg-ids #197

Closed
wants to merge 2 commits into from

Conversation

kesara
Copy link

@kesara kesara commented Jun 2, 2023

No description provided.

@dkg
Copy link
Contributor

dkg commented Feb 22, 2024

@kesara can you give an example of a document where it's important to bubble up this failure as a critical failure?

@kesara
Copy link
Author

kesara commented Feb 22, 2024

@kesara can you give an example of a document where it's important to bubble up this failure as a critical failure?

@dkg I don't have an example in hand.
IIRC this was an issue I came across when I was implementing https://author-tools.ietf.org/clean-svg-ids
Author Tools logic relied on exit codes to identify errors.

@@ -18,6 +18,7 @@ def svg_clean_ids(s)
rescue => detail
warn "*** Can't clean SVG: #{detail}"
d.to_s
exit 1
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means there will be no output while the previous line was careful preparing to return something useful.

I'm not even sure that failing in this case warrants an exit code 1.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it makes sense not to exit with 1.

@kesara kesara closed this Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants