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 e1f2704 commit 7f72389
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 @@ -5,6 +5,7 @@ class GoAT122 < Formula
mirror "https://fossies.org/linux/misc/go1.22.10.src.tar.gz"
sha256 "1e94fd48be750d1fafb4d9b3b6dd31a6e9d2735d339bf2462bc97b64ca4c1037"
license "BSD-3-Clause"
revision 1

livecheck do
url "https://go.dev/dl/?mode=json"
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 7f72389

Please sign in to comment.