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

fix: Report bad usage to stderr #43

Open
wants to merge 2 commits into
base: Agoric
Choose a base branch
from
Open

Conversation

kriskowal
Copy link
Collaborator

While integrating #42, we discovered that agd mnemonic depended on xsnap -v to be implemented, but since that feature was in another branch, xsnap -v printed out the usage error information to stdout, in place of the version information.

This change causes xsnap -h to write the usage to stdout, and all bad usage errors to write the same message to stderr.

@kriskowal kriskowal requested a review from michaelfig June 12, 2023 19:35
fprintf(file, "\t-h: print this help message\n");
fprintf(file, "\t-i <interval>: metering interval (default to 1)\n");
fprintf(file, "\t-l <limit>: metering limit (default to none)\n");
fprintf(file, "\t-s <size>: parser buffer size, in kB (default to 8192)\n");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
fprintf(file, "\t-s <size>: parser buffer size, in kB (default to 8192)\n");
fprintf(file, "\t-n: print worker interface codename\n");
fprintf(file, "\t-s <size>: parser buffer size, in kB (default to 8192)\n");

Copy link
Collaborator

Choose a reason for hiding this comment

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

@kriskowal Please ping me back when you have adopted something like this, and I'll rereview.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Pardon, my attention has been elsewhere. Will post.

@michaelfig
Copy link
Collaborator

Actually, it was -n, not -v that was not implemented, and that flag was not documented even on the correct branch.

Co-authored-by: Michael FIG <mfig@agoric.com>
@kriskowal kriskowal requested a review from michaelfig June 14, 2023 00:05
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