mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-05-24 15:52:38 +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
|
// Parse all parameters
|
||||||
func (c *Converter) Parse() {
|
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 {
|
if c.Options.Help {
|
||||||
c.Cmd.Usage()
|
c.Cmd.Usage()
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user