From 1543d431bc68c8967f3dd69e08c23ce4aaddece2 Mon Sep 17 00:00:00 2001 From: Stephen Date: Thu, 28 Oct 2021 06:30:19 -0600 Subject: [PATCH] goenv: don't `inreplace` `init.bats` on HEAD installs (#88169) init.bats no longer exists. --- Formula/goenv.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Formula/goenv.rb b/Formula/goenv.rb index fdb28d81670..d4c4bc12eb6 100644 --- a/Formula/goenv.rb +++ b/Formula/goenv.rb @@ -18,13 +18,15 @@ class Goenv < Formula end def install - inreplace [ + inreplace_files = [ "libexec/goenv", "plugins/go-build/install.sh", "test/goenv.bats", - "test/init.bats", "test/test_helper.bash", - ], "/usr/local", HOMEBREW_PREFIX + ] + inreplace_files << "test/init.bats" unless build.head? + inreplace inreplace_files, "/usr/local", HOMEBREW_PREFIX + prefix.install Dir["*"] %w[goenv-install goenv-uninstall go-build].each do |cmd| bin.install_symlink "#{prefix}/plugins/go-build/bin/#{cmd}"