From 6afe717dc9e716bb7e2d893d500fdf3d8b94b872 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Mon, 17 Apr 2023 21:10:09 -0300 Subject: [PATCH] fix: do not fatal on automaxprocs error (#3946) This might fail on windows/wsl (see https://github.com/uber-go/automaxprocs/issues/65), and its not too bad if it fails, actually, so, let's just warn the error instead of exiting 1 closes #3945 Signed-off-by: Carlos Alexandro Becker --------- Signed-off-by: Carlos Alexandro Becker --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 113b12ff4..ec1d79952 100644 --- a/main.go +++ b/main.go @@ -29,7 +29,8 @@ func init() { // automatically set GOMAXPROCS to match available CPUs. // GOMAXPROCS will be used as the default value for the --parallelism flag. if _, err := maxprocs.Set(); err != nil { - log.WithError(err).Fatal("failed to set GOMAXPROCS") + // might fail on WSL... + log.WithError(err).Warn("failed to set GOMAXPROCS") } }