Skip to content

Commit

Permalink
Merge pull request #1 from micaelmalta/fix-set-exit-status
Browse files Browse the repository at this point in the history
This fixes set-exit-status when using `./...`
  • Loading branch information
micaelmalta authored May 27, 2024
2 parents 5f29621 + cfb73ee commit 85aa55b
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 85aa55b

Please sign in to comment.