Warn when overwriting an artifact.
This commit is contained in:
parent
9a29bd35e6
commit
e63efb3fe4
@ -42,11 +42,8 @@ module Hbc
|
|||||||
|
|
||||||
def preflight_checks
|
def preflight_checks
|
||||||
if Utils.path_occupied?(target)
|
if Utils.path_occupied?(target)
|
||||||
if force
|
raise CaskError, warning_target_exists << "." unless force
|
||||||
ohai(warning_target_exists { |s| s << "overwriting." })
|
opoo(warning_target_exists { |s| s << "overwriting." })
|
||||||
else
|
|
||||||
raise CaskError, warning_target_exists << "."
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
unless source.exist?
|
unless source.exist?
|
||||||
message = "It seems the #{self.class.artifact_english_name} source is not there: '#{source}'"
|
message = "It seems the #{self.class.artifact_english_name} source is not there: '#{source}'"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user