Skip to content

Commit

Permalink
[email protected]: don't set GOTOOLCHAIN=local
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanb committed Jan 16, 2025
1 parent 0ade651 commit b2e8644
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions Formula/g/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class GoAT122 < Formula
url "https://go.dev/dl/go1.22.10.src.tar.gz"
mirror "https://fossies.org/linux/misc/go1.22.10.src.tar.gz"
sha256 "1e94fd48be750d1fafb4d9b3b6dd31a6e9d2735d339bf2462bc97b64ca4c1037"
revision 1
license "BSD-3-Clause"

livecheck do
Expand Down Expand Up @@ -33,8 +34,6 @@ class GoAT122 < Formula
depends_on "go" => :build

def install
inreplace "go.env", /^GOTOOLCHAIN=.*$/, "GOTOOLCHAIN=local"

cd "src" do
ENV["GOROOT_FINAL"] = libexec
# Set portable defaults for CC/CXX to be used by cgo
Expand All @@ -53,17 +52,7 @@ def install
rm_r(libexec/"src/runtime/pprof/testdata")
end

def caveats
<<~EOS
Homebrew's Go toolchain is configured with
GOTOOLCHAIN=local
per Homebrew policy on tools that update themselves.
EOS
end

test do
assert_equal "local", shell_output("#{bin}/go env GOTOOLCHAIN").strip

(testpath/"hello.go").write <<~GO
package main
Expand Down

0 comments on commit b2e8644

Please sign in to comment.