Skip to content

feat(xtask): ✨ Exit with an error code when appropriate #2823

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zmerp
Copy link
Member

@zmerp zmerp commented May 9, 2025

No description provided.

Copy link
Collaborator

@The-personified-devil The-personified-devil left a comment

Choose a reason for hiding this comment

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

There's a couple more places that use panic as not an error condition but just as "print and exit with error code", so it might make sense to just refactor this out into a simple function (that simply takes a string so we don't need to use a macro) and use that instead.

Comment on lines -269 to 273
println!("\nUnrecognized subcommand.");
eprintln!("\nUnrecognized subcommand.");
println!("{HELP_STR}");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Tbh both should go into error out, splitting them is probably just confusing.

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.

2 participants