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

This reverts commit abf8df38661c4b60f122336d3db3a1a810d3a0e8.
This commit is contained in:
Branch Vincent 2024-04-23 18:33:35 -07:00
parent 06126572b3
commit 4bf8fef5aa
No known key found for this signature in database
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