From ab62be5345ddd30813aef1d1772a131bd0c32fa5 Mon Sep 17 00:00:00 2001 From: "L. E. Segovia" Date: Wed, 29 Nov 2017 01:02:50 +0000 Subject: [PATCH] Implement @reitermarkus's comments Leftover && and remove xattr "copy" --- Library/Homebrew/cask/lib/hbc/artifact/moved.rb | 2 -- Library/Homebrew/cask/lib/hbc/installer.rb | 12 ++++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Library/Homebrew/cask/lib/hbc/artifact/moved.rb b/Library/Homebrew/cask/lib/hbc/artifact/moved.rb index dfd6008cf0..f5ef790ebb 100644 --- a/Library/Homebrew/cask/lib/hbc/artifact/moved.rb +++ b/Library/Homebrew/cask/lib/hbc/artifact/moved.rb @@ -70,8 +70,6 @@ module Hbc else command.run("/bin/mv", args: [target, source], sudo: true) end - - add_altname_metadata(source, target.basename, command: command) end def delete(target, force: false, command: nil, **_) diff --git a/Library/Homebrew/cask/lib/hbc/installer.rb b/Library/Homebrew/cask/lib/hbc/installer.rb index 5879cd3e1c..f7b8379590 100644 --- a/Library/Homebrew/cask/lib/hbc/installer.rb +++ b/Library/Homebrew/cask/lib/hbc/installer.rb @@ -459,12 +459,12 @@ module Hbc # Homebrew-Cask metadata if backup_metadata_path.respond_to?(:children) && - backup_metadata_path.exist? && - backup_metadata_path.children.each do |subdir| - unless PERSISTENT_METADATA_SUBDIRS.include?(subdir.basename) - gain_permissions_remove(subdir) - end - end + backup_metadata_path.exist? + backup_metadata_path.children.each do |subdir| + unless PERSISTENT_METADATA_SUBDIRS.include?(subdir.basename) + gain_permissions_remove(subdir) + end + end end backup_metadata_path.rmdir_if_possible end