From 6e0e6813f19a43ccc121d19ee762667621e3ab01 Mon Sep 17 00:00:00 2001 From: sysops Date: Fri, 10 Jul 2026 17:48:22 +0200 Subject: [PATCH] Fix bootstrap.sh: go not found on PATH after install /usr/local/bin wasn't guaranteed to be on PATH in non-interactive shells, so the symlinked go binary was invisible to later steps. Export PATH explicitly and fail fast if go is still missing. Co-Authored-By: Claude Sonnet 5 --- bootstrap.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bootstrap.sh b/bootstrap.sh index 23262de..9b77bc0 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -37,15 +37,23 @@ export DEBIAN_FRONTEND=noninteractive apt-get update apt-get install -y git wireguard-tools nftables curl ca-certificates +export PATH="/usr/local/go/bin:/usr/local/bin:$PATH" + if ! command -v go >/dev/null 2>&1; then echo "Installing Go ${GO_VERSION}..." ARCH="$(dpkg --print-architecture)" curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-${ARCH}.tar.gz" -o /tmp/go.tar.gz + rm -rf /usr/local/go tar -C /usr/local -xzf /tmp/go.tar.gz ln -sf /usr/local/go/bin/go /usr/local/bin/go rm -f /tmp/go.tar.gz fi +if ! command -v go >/dev/null 2>&1; then + echo "go still not found on PATH after install attempt (/usr/local/go/bin)." >&2 + exit 1 +fi + if [[ -d "$SRC_DIR/.git" ]]; then echo "Updating existing checkout at $SRC_DIR..." git -C "$SRC_DIR" fetch --depth 1 origin "$REF"