Merge pull request #17141 from branchvincent/brew_home

Reapply "formula: configure git/npm to ignore .brew_home"
This commit is contained in:
Mike McQuaid 2024-04-24 15:24:36 +01:00 committed by GitHub
commit ea713853fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -3123,6 +3123,8 @@ class Formula
end end
setup_home env_home setup_home env_home
# Don't dirty the git tree for git clones.
(env_home/".gitignore").write "*"
ENV.clear_sensitive_environment! ENV.clear_sensitive_environment!

View File

@ -55,9 +55,6 @@ module Language
sig { params(libexec: Pathname).returns(T::Array[String]) } sig { params(libexec: Pathname).returns(T::Array[String]) }
def self.std_npm_install_args(libexec) def self.std_npm_install_args(libexec)
setup_npm_environment 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 pack = pack_for_installation