Skip to content

Commit

Permalink
Bail out if 'go build' fails
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryMichal committed Nov 21, 2021
1 parent 333dbfa commit 1b6b9c2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/go-build-wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ if ! cd "$1"; then
exit 1
fi

go build -trimpath -ldflags "-extldflags '-Wl,-rpath,/run/host/usr/lib -Wl,-rpath,/run/host/usr/lib64' -linkmode external -X github.com/containers/toolbox/pkg/version.currentVersion=$3" -o "$2/toolbox"
go build -trimpath -ldflags "-extldflags '-Wl,-rpath,/run/host/usr/lib -Wl,-rpath,/run/host/usr/lib64'
-linkmode external -X github.com/containers/toolbox/pkg/version.currentVersion=$3" -o "$2/toolbox"
if [ $? -ne 0 ]; then
echo "go-build-wrapper: failed to build toolbox"
exit 1
fi

if ! interpreter=$(patchelf --print-interpreter "$2/toolbox"); then
echo "go-build-wrapper: failed to read PT_INTERP from $2/toolbox" >&2
Expand Down

0 comments on commit 1b6b9c2

Please sign in to comment.