Skip to content

Commit d5a8846

Browse files
exit codes (#382)
1 parent 903ab98 commit d5a8846

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cmd/lekko/sync.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,11 @@ func diffCmd() *cobra.Command {
318318
return err
319319
}
320320
if !isHeadSame && !isBaseSame {
321-
return errors.New("Create a PR to fix Base first\n")
321+
fmt.Print("Create a PR to fix Base first\n")
322+
os.Exit(1)
322323
} else if !isHeadSame && isBaseSame {
323-
return errors.New("Push Head changes to Lekko before Merge\n")
324+
fmt.Print("Push Head changes to Lekko before Merge\n")
325+
os.Exit(2)
324326
} else if isHeadSame && !isBaseSame {
325327
fmt.Print("Merging will make Base = Lekko\n")
326328
return nil

0 commit comments

Comments
 (0)