mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-05-24 07:42:37 +02:00
handle error on parse
This commit is contained in:
parent
e435397bc0
commit
cc7dfc8d54
@ -228,7 +228,9 @@ func (c *Converter) isZeroValue(f *flag.Flag, value string) (ok bool, err error)
|
||||
|
||||
// Parse all parameters
|
||||
func (c *Converter) Parse() {
|
||||
_ = c.Cmd.Parse(os.Args[1:])
|
||||
if err := c.Cmd.Parse(os.Args[1:]); err != nil {
|
||||
utils.Fatalf("cannot parse command line options: %v", err)
|
||||
}
|
||||
if c.Options.Help {
|
||||
c.Cmd.Usage()
|
||||
os.Exit(0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user