Raise if installing a non-existent file
This commit is contained in:
		
							parent
							
								
									9bc60b80b6
								
							
						
					
					
						commit
						65e1419ea9
					
				@ -33,7 +33,8 @@ class Pathname
 | 
			
		||||
  def install src
 | 
			
		||||
    if src.is_a? Array
 | 
			
		||||
      src.collect {|src| install src }
 | 
			
		||||
    elsif File.exist? src
 | 
			
		||||
    else
 | 
			
		||||
      raise "#{src} does not exist" unless File.exist? src
 | 
			
		||||
      mkpath
 | 
			
		||||
      if File.symlink? src
 | 
			
		||||
        # we use the BSD mv command because FileUtils copies the target and
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user