From cbbea76f9513800f6256fc86917bbecc882c2b83 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Wed, 31 Jan 2024 15:24:07 +0100 Subject: [PATCH] fix: go build error handling Closes #673 --- build-go.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build-go.sh b/build-go.sh index 7715161e..025f476e 100755 --- a/build-go.sh +++ b/build-go.sh @@ -106,9 +106,10 @@ function goBuild() { local output output="$(pwd)/$(basename "$package")$(go env GOEXE)" - go build -mod=mod -o "$output" \ - -trimpath \ - "${package}" + if ! (go build -mod=mod -o "$output" -trimpath "${package}"); then + warn " go build with $package $goos $goarch failed." + return 1 + fi if [ -x "$(which glibc-check)" ] && [ "$GOOS" == "linux" ] && [ "$GOARCH" == "amd64" ]; then echo "GLIBC versions:"