Skip to content

Commit

Permalink
bb_worker: Fix crash when specifying a non-positive concurrency
Browse files Browse the repository at this point in the history
There is no error to wrap here. We should use status.Error() instead.
  • Loading branch information
EdSchouten committed Dec 3, 2024
1 parent 8a43a77 commit dfdb1c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/bb_worker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func main() {
}
for _, runnerConfiguration := range buildDirectoryConfiguration.Runners {
if runnerConfiguration.Concurrency < 1 {
return util.StatusWrap(err, "Runner concurrency must be positive")
return status.Error(codes.InvalidArgument, "Runner concurrency must be positive")
}
concurrencyLength := len(strconv.FormatUint(runnerConfiguration.Concurrency-1, 10))

Expand Down

0 comments on commit dfdb1c2

Please sign in to comment.