From ab8a3c40d45ce67368f5615a0d4af298d7a6a87e Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Tue, 15 Sep 2026 10:04:57 +0200 Subject: [PATCH] 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. --- ct/tor-snowflake.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/tor-snowflake.sh b/ct/tor-snowflake.sh index 3bf693a15..ddbb0620b 100644 --- a/ct/tor-snowflake.sh +++ b/ct/tor-snowflake.sh @@ -44,7 +44,8 @@ function update_script() { msg_ok "Stopped Service" CLEAN_INSTALL=1 GITLAB_URL="https://gitlab.torproject.org" fetch_and_deploy_gl_release "tor-snowflake" "tpo/anti-censorship/pluggable-transports/snowflake" "tarball" - GO_VERSION="$(grep -m1 '^go ' /opt/tor-snowflake/proxy/go.mod | awk '{print $2}')" setup_go + GO_VERSION="$(awk '/^go /{print $2; exit}' /opt/tor-snowflake/go.mod 2>/dev/null || true)" + GO_VERSION="${GO_VERSION:-latest}" setup_go msg_info "Building Snowflake" cd /opt/tor-snowflake/proxy