From dfdb1c2697174e49a2a22f70b21f50dadaee55ca Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Tue, 3 Dec 2024 14:42:19 +0100 Subject: [PATCH] bb_worker: Fix crash when specifying a non-positive concurrency There is no error to wrap here. We should use status.Error() instead. --- cmd/bb_worker/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/bb_worker/main.go b/cmd/bb_worker/main.go index 0ae94228..457fc134 100644 --- a/cmd/bb_worker/main.go +++ b/cmd/bb_worker/main.go @@ -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))