mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-17 10:14:00 +00:00
* tor-snowflake: read the Go version from the module root Snowflake is a single Go module with go.mod at the repository root, not under proxy/. The install read /opt/tor-snowflake/proxy/go.mod, which has never existed, so grep failed and the version came out empty. Go was then fetched from https://go.dev/dl/go.linux-amd64.tar.gz with no version in the name, and the install aborted at that download. Read the directive with a single awk instead of grep piped into awk. The pipeline tripped catch_errors, which sets -Ee with pipefail and an ERR trap, the moment the file was missing; that is the "exit code 2 while executing command awk" line that preceded the download failure. Fall back to latest when the file cannot be read, so a future upstream move of go.mod costs a Go version that is newer than the one pinned rather than a failed build. setup_go already resolves latest, and also resolves a bare major.minor to its newest patch, so a go directive without a patch level stays fine. Verified against v2.14.1: go.mod sits at the root and declares go 1.24.0, and the awk yields 1.24.0 from it and latest from a missing file without tripping the ERR trap. * Refactor GO_VERSION extraction in tor-snowflake.sh Updated the method of extracting GO_VERSION from go.mod and set a default value if not found.
1.3 KiB
1.3 KiB