From 74877383c370b2fba2f2112e47bfa0665fa29ba1 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Thu, 12 May 2022 12:05:38 +0300 Subject: [PATCH] compare-states: return 1 when the state is different And don't pring usage. --- scripts/compare-states/compare-states.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/compare-states/compare-states.go b/scripts/compare-states/compare-states.go index c90c1b954..c4305aa8f 100644 --- a/scripts/compare-states/compare-states.go +++ b/scripts/compare-states/compare-states.go @@ -133,7 +133,7 @@ func cliMain(c *cli.Context) error { }) fmt.Println(diff) } - return nil + return errors.New("different state found") } func main() { @@ -145,7 +145,6 @@ func main() { if err := ctl.Run(os.Args); err != nil { fmt.Fprintln(os.Stderr, err) - fmt.Fprintln(os.Stderr, ctl.Usage) os.Exit(1) } }