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

Don't show CLI usage on API error #77

Merged
merged 1 commit into from
Mar 20, 2023
Merged

Conversation

mickael-menu
Copy link
Member

This disables CLI usage output when an error occurs while parsing a publication (See spf13/cobra#340).

Basically changes:

$ rwp manifest invalid.epub
Error: failed opening invalid.epub: failed parsing asset: failed loading container.xml: resource: error 404: couldn't find /META-INF/container.xml in FileFetcher paths
Usage:
  rwp manifest <pub-path> [flags]

Flags:
  -h, --help                help for manifest
  -i, --indent string       Indentation used to pretty-print
      --infer-a11y string   Infer accessibility metadata: no, merged, split (default "no")
      --infer-page-count    Infer the number of pages from the generated position list.

to just:

$ rwp manifest invalid.epub
Error: failed opening invalid.epub: failed parsing asset: failed loading container.xml: resource: error 404: couldn't find /META-INF/container.xml in FileFetcher paths

Copy link
Member

@chocolatkey chocolatkey left a comment

Choose a reason for hiding this comment

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

LGTM

@mickael-menu mickael-menu merged commit e503020 into main Mar 20, 2023
@mickael-menu mickael-menu deleted the dont-show-usage-on-error branch March 20, 2023 16:24
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