utils: create GEM_HOME when installing Gems.
It may not exist before Gem installation which means that the resulting installed gem will not be found in the PATH.
This commit is contained in:
		
							parent
							
								
									77b9ef84ee
								
							
						
					
					
						commit
						5b19563937
					
				@ -189,6 +189,9 @@ module Homebrew
 | 
			
		||||
    Gem.clear_paths
 | 
			
		||||
    Gem::Specification.reset
 | 
			
		||||
 | 
			
		||||
    # Create GEM_HOME which may not exist yet so it exists when creating PATH.
 | 
			
		||||
    FileUtils.mkdir_p Gem.bindir
 | 
			
		||||
 | 
			
		||||
    # Add Gem binary directory and (if missing) Ruby binary directory to PATH.
 | 
			
		||||
    path = PATH.new(ENV["PATH"])
 | 
			
		||||
    path.prepend(RUBY_BIN) if which("ruby") != RUBY_PATH
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user