Skip to content

Commit eae15e3

Browse files
committed
quickfix: error logged needlessly, checking for sentinel error value
1 parent dd81d42 commit eae15e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/protolock/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ func status(cfg *protolock.Config) {
121121
if *plugins != "" {
122122
report, err = runPlugins(*plugins, report)
123123
if err != nil {
124-
fmt.Println(err)
124+
fmt.Println("[protolock]:", err)
125125
os.Exit(1)
126126
}
127127
}
128128

129129
code, err := protolock.HandleReport(report, os.Stdout, err)
130-
if err != nil {
131-
fmt.Println(err)
130+
if err != protolock.ErrWarningsFound && err != nil {
131+
fmt.Println("[protolock]:", err)
132132
os.Exit(1)
133133
}
134134

0 commit comments

Comments
 (0)