From cf7865b5d143e1406da6164541bcac6a03d0e2a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20D=C3=BCren?= Date: Fri, 14 Mar 2025 23:05:23 +0100 Subject: [PATCH] Fix Go version compatibility by using local toolchain --- start.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/start.sh b/start.sh index 58437ff..e600ca1 100644 --- a/start.sh +++ b/start.sh @@ -352,8 +352,8 @@ cd "$SERVER_DIR" # Set Go module cache to a writable location export GOPATH=/app/data/go export GO111MODULE=on -# Set version compatibility flags -export GOTOOLCHAIN=auto +# Use local Go version instead of trying to download +export GOTOOLCHAIN=local # Override version requirements export GOFLAGS="-mod=mod" # Create a temporary directory for Go module cache and build in writable area @@ -434,8 +434,8 @@ elif [ -d "$SERVER_DIR/cmd/museum" ]; then # Instead of modifying go.mod, set environment variables for compatibility echo "==> Setting Go environment variables for compatibility" export GOFLAGS="-mod=mod" - # Explicitly skip version check - export GOTOOLCHAIN=auto + # Use local Go version + export GOTOOLCHAIN=local # For Wasabi specific settings if [[ "${S3_ENDPOINT}" == *"wasabi"* ]]; then @@ -514,7 +514,7 @@ else # Instead of trying to modify go.mod, set environment variables for compatibility echo "==> Setting Go environment variables for compatibility" export GOFLAGS="-mod=mod" - export GOTOOLCHAIN=auto + export GOTOOLCHAIN=local echo "==> Running main.go with Go" /usr/local/bin/gosu cloudron:cloudron go run -mod=mod main.go --port 8000 \