diff options
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/artifact/moved.rb')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/artifact/moved.rb | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/Library/Homebrew/cask/lib/hbc/artifact/moved.rb b/Library/Homebrew/cask/lib/hbc/artifact/moved.rb index 856ab2766..5a7483543 100644 --- a/Library/Homebrew/cask/lib/hbc/artifact/moved.rb +++ b/Library/Homebrew/cask/lib/hbc/artifact/moved.rb @@ -62,14 +62,16 @@ module Hbc            raise CaskError, "It seems the #{self.class.english_name} source '#{target}' is not there."          end -        ohai "Moving #{self.class.english_name} '#{target.basename}' back to '#{source}'." +        ohai "Copying #{self.class.english_name} '#{target.basename}' back to '#{source}'."          source.dirname.mkpath          if target.parent.writable? -          FileUtils.move(target, source) +          FileUtils.cp_r(target, source)          else -          command.run("/bin/mv", args: [target, source], sudo: true) +          command.run("/bin/cp", args: ["-r", target, source], sudo: true)          end + +        delete(target, force: force, command: command, **options)        end        def delete(target, force: false, command: nil, **_) | 
