#!/bin/sh set -eu # Pi passes -c and the command as separate arguments. Never evaluate them here. [ "$#" -eq 2 ] && [ "$1" = '-c' ] || exit 125 command=$2 /usr/bin/mkdir -p /tmp/pi-shell/go-build /tmp/pi-shell/go-tmp set -- /opt/bwrap --die-with-parent --new-session \ --unshare-user --unshare-pid --unshare-net --unshare-ipc --unshare-uts \ --disable-userns --cap-drop ALL \ --ro-bind /usr /usr --ro-bind /etc /etc \ --symlink usr/bin /bin --symlink usr/lib /lib --symlink usr/lib64 /lib64 \ --proc /proc --dev /dev --dir /home/runner \ --bind /workspace /workspace --bind /tmp/pi-shell /tmp \ --chdir /workspace --clearenv \ --setenv HOME /home/runner --setenv TMPDIR /tmp --setenv LANG C.UTF-8 \ --setenv PATH /opt/go/bin:/usr/bin:/bin \ --setenv GIT_CONFIG_GLOBAL /dev/null --setenv GIT_CONFIG_NOSYSTEM 1 if [ -d /opt/go ]; then set -- "$@" --ro-bind /opt/go /opt/go --ro-bind-try /opt/go-mod /opt/go-mod \ --setenv GOROOT /opt/go --setenv GOMODCACHE /opt/go-mod \ --setenv GOCACHE /tmp/go-build --setenv GOTMPDIR /tmp/go-tmp \ --setenv GOPROXY off --setenv GOSUMDB off --setenv GOTOOLCHAIN local \ --setenv GOENV off --setenv GOWORK off --setenv GOFLAGS '' \ --setenv GOTELEMETRY off --setenv CGO_ENABLED 0 fi exec /usr/bin/env -i "$@" -- /usr/bin/bash --noprofile --norc -c "$command"