formula: configure git/npm to ignore .brew_home
This commit is contained in:
		
							parent
							
								
									47c2c6deed
								
							
						
					
					
						commit
						46a3bbe3c5
					
				@ -2673,6 +2673,8 @@ class Formula
 | 
				
			|||||||
  def setup_home(home)
 | 
					  def setup_home(home)
 | 
				
			||||||
    # Don't let bazel write to tmp directories we don't control or clean.
 | 
					    # Don't let bazel write to tmp directories we don't control or clean.
 | 
				
			||||||
    (home/".bazelrc").write "startup --output_user_root=#{home}/_bazel"
 | 
					    (home/".bazelrc").write "startup --output_user_root=#{home}/_bazel"
 | 
				
			||||||
 | 
					    # Don't dirty the git tree for git clones.
 | 
				
			||||||
 | 
					    (home/".gitignore").write "*"
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Returns a list of Dependency objects that are declared in the formula.
 | 
					  # Returns a list of Dependency objects that are declared in the formula.
 | 
				
			||||||
 | 
				
			|||||||
@ -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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user