Skip to content

Commit 741970b

Browse files
authored
Merge pull request #490 from numtide/fix/exit-on-formatter-errors
fix/exit on formatter errors
2 parents a05a7be + ab89e0b commit 741970b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

format/scheduler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func (s *scheduler) schedule(ctx context.Context, key batchKey, batch []*walk.Fi
154154
hasErrors := len(formatErrors) > 0
155155

156156
// update overall error tracking
157-
s.formatError.Store(hasErrors)
157+
s.formatError.CompareAndSwap(false, hasErrors)
158158

159159
if !hasErrors {
160160
// record that the file was formatted

0 commit comments

Comments
 (0)