Skip to content

Commit

Permalink
This fixes set-exit-status when using ./...
Browse files Browse the repository at this point in the history
  • Loading branch information
micaelmalta committed May 27, 2024
1 parent 5f29621 commit cfb73ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ func main() {
log.Fatalf("Failed to find unformatted files %s: %+v\n", originPath, err)
}
fmt.Printf("%s\n", unformattedFiles.String())
if *setExitStatus && unformattedFiles != nil {
os.Exit(1)
}
return
}
err := reviser.NewSourceDir(originProjectName, originPath, *isRecursive, excludes).Fix(options...)
Expand Down

0 comments on commit cfb73ee

Please sign in to comment.