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."
|
"source '#{source}' is not there."
|
||||||
end
|
end
|
||||||
|
|
||||||
if target.exist? && !target.symlink?
|
if target.exist?
|
||||||
raise CaskError,
|
raise CaskError,
|
||||||
"It seems there is already #{self.class.english_article} " \
|
"It seems there already exists #{self.class.english_article} " \
|
||||||
"#{self.class.english_name} at '#{target}'; not linking."
|
"#{self.class.english_name} at '#{target}'; not overwriting."
|
||||||
end
|
end
|
||||||
|
|
||||||
ohai "Linking #{self.class.english_name} '#{source.basename}' to '#{target}'."
|
ohai "Linking #{self.class.english_name} '#{source.basename}' to '#{target}'."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user