compare-states: return 1 when the state is different

And don't pring usage.
This commit is contained in:
Roman Khimov 2022-05-12 12:05:38 +03:00
parent 84c231757b
commit 74877383c3

View file

@ -133,7 +133,7 @@ func cliMain(c *cli.Context) error {
}) })
fmt.Println(diff) fmt.Println(diff)
} }
return nil return errors.New("different state found")
} }
func main() { func main() {
@ -145,7 +145,6 @@ func main() {
if err := ctl.Run(os.Args); err != nil { if err := ctl.Run(os.Args); err != nil {
fmt.Fprintln(os.Stderr, err) fmt.Fprintln(os.Stderr, err)
fmt.Fprintln(os.Stderr, ctl.Usage)
os.Exit(1) os.Exit(1)
} }
} }