cask/artifact/symlinked: do not overwrite files or symbolic links
This commit is contained in:
		
							parent
							
								
									96fee494c4
								
							
						
					
					
						commit
						7aaa7f25ec
					
				@ -44,10 +44,10 @@ module Cask
 | 
			
		||||
                "source '#{source}' is not there."
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        if target.exist? && !target.symlink?
 | 
			
		||||
        if target.exist?
 | 
			
		||||
          raise CaskError,
 | 
			
		||||
                "It seems there is already #{self.class.english_article} " \
 | 
			
		||||
                "#{self.class.english_name} at '#{target}'; not linking."
 | 
			
		||||
                "It seems there already exists #{self.class.english_article} " \
 | 
			
		||||
                "#{self.class.english_name} at '#{target}'; not overwriting."
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        ohai "Linking #{self.class.english_name} '#{source.basename}' to '#{target}'."
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user