Skip to content

Commit c5e6c4a

Browse files
JulesDTgcmurphy
authored andcommitted
fix no-fail flag logic
1 parent 2bd007e commit c5e6c4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/gosec/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ func main() {
352352
logWriter.Close() // #nosec
353353

354354
// Do we have an issue? If so exit 1 unless NoFail is set
355-
if issuesFound && !*flagNoFail || len(errors) != 0 {
355+
if (issuesFound || len(errors) != 0) && !*flagNoFail {
356356
os.Exit(1)
357357
}
358358
}

0 commit comments

Comments
 (0)