Revert "formula: configure git/npm to ignore .brew_home"

This commit is contained in:
Mike McQuaid 2024-04-23 16:09:57 +01:00 committed by GitHub
parent 966454c97d
commit abf8df3866
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -2803,8 +2803,6 @@ class Formula
def setup_home(home)
# Don't let bazel write to tmp directories we don't control or clean.
(home/".bazelrc").write "startup --output_user_root=#{home}/_bazel"
# Don't dirty the git tree for git clones.
(home/".gitignore").write "*"
end
# Returns a list of Dependency objects that are declared in the formula.

View File

@ -55,6 +55,9 @@ module Language
sig { params(libexec: Pathname).returns(T::Array[String]) }
def self.std_npm_install_args(libexec)
setup_npm_environment
# tell npm to not install .brew_home by adding it to the .npmignore file
# (or creating a new one if no .npmignore file already exists)
open(".npmignore", "a") { |f| f.write("\n.brew_home\n") }
pack = pack_for_installation