Skip to content

Commit

Permalink
go: remove misleading comment in go.env
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
carlocab committed Dec 21, 2024
1 parent 1c313ab commit 753adef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Formula/g/go.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 753adef

Please sign in to comment.