Skip to content

Commit

Permalink
Merge pull request #17116 from branchvincent/ignore-home
Browse files Browse the repository at this point in the history
formula: configure git/npm to ignore .brew_home
  • Loading branch information
MikeMcQuaid authored Apr 21, 2024
2 parents 2ab0af6 + 46a3bbe commit c9d5b4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Library/Homebrew/formula.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2673,6 +2673,8 @@ def inreplace(paths, before = nil, after = nil, audit_result = true, &block) # r
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.
Expand Down
3 changes: 0 additions & 3 deletions Library/Homebrew/language/node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ def self.setup_npm_environment
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

Expand Down

0 comments on commit c9d5b4a

Please sign in to comment.