From 71727f4f1ff6e4d2b4a454556ccd320c3d810082 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera Date: Sat, 21 Dec 2024 20:01:48 +0800 Subject: [PATCH] go: remove misleading comment in `go.env` See #202030 and golang/go#70949. In particular, our current `go.env` contains # Automatically download newer toolchains as directed by go.mod files. # See https://go.dev/doc/toolchain for details. GOTOOLCHAIN=local The comment about automatically downloading newer toolchains applies only whenever `GOTOOLCHAIN=auto`, but we change that to `GOTOOLCHAIN=local`. Therefore, let's get rid of the comment that no longer applies after our `GOTOOLCHAIN` change. --- Formula/g/go.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Formula/g/go.rb b/Formula/g/go.rb index 90e70b1b71d31..a8f3fb0aa1baf 100644 --- a/Formula/g/go.rb +++ b/Formula/g/go.rb @@ -63,7 +63,11 @@ class Go < Formula end def install - inreplace "go.env", /^GOTOOLCHAIN=.*$/, "GOTOOLCHAIN=local" + inreplace "go.env" do |s| + # Remove misleading comment about automatically downloading newer toolchains. + s.gsub!(/^# Automatically download.*$/, "") + s.gsub!(/^GOTOOLCHAIN=.*$/, "GOTOOLCHAIN=local") + end (buildpath/"gobootstrap").install resource("gobootstrap") ENV["GOROOT_BOOTSTRAP"] = buildpath/"gobootstrap"