Skip to content

Commit

Permalink
fix: go build error handling
Browse files Browse the repository at this point in the history
Closes #673
  • Loading branch information
lidel committed Jan 31, 2024
1 parent f09c1bf commit cbbea76
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions build-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
Expand Down

0 comments on commit cbbea76

Please sign in to comment.