diff options
| author | L. E. Segovia | 2017-11-28 13:34:50 +0000 |
|---|---|---|
| committer | L. E. Segovia | 2017-11-28 13:34:50 +0000 |
| commit | 8386b9384c30be142d76da3ae2e24da1bb166bde (patch) | |
| tree | 950ed642f1ccc3731fb755022476a17dcb68ecc8 /Library/Homebrew/cask/lib | |
| parent | f3355b2a2c4a2128427af425efac1df5a336ba5e (diff) | |
| download | brew-8386b9384c30be142d76da3ae2e24da1bb166bde.tar.bz2 | |
Solve styling and metadata issues
Diffstat (limited to 'Library/Homebrew/cask/lib')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/artifact/moved.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/installer.rb | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/artifact/moved.rb b/Library/Homebrew/cask/lib/hbc/artifact/moved.rb index 11e019af2..dfd6008cf 100644 --- a/Library/Homebrew/cask/lib/hbc/artifact/moved.rb +++ b/Library/Homebrew/cask/lib/hbc/artifact/moved.rb @@ -71,7 +71,7 @@ module Hbc command.run("/bin/mv", args: [target, source], sudo: true) end - add_altname_metadata(target, source.basename, command: command) + 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 84a8ac9b7..3dd2a7990 100644 --- a/Library/Homebrew/cask/lib/hbc/installer.rb +++ b/Library/Homebrew/cask/lib/hbc/installer.rb @@ -452,8 +452,11 @@ module Hbc ohai "Purging files for version #{@cask.version} of Cask #{@cask}" # versioned staged distribution - staged_path = version_is_latest? ? - backup_path(@cask.staged_path) : @cask.staged_path + if version_is_latest? + staged_path = backup_path(@cask.staged_path) + else + staged_path = @cask.staged_path + end gain_permissions_remove(staged_path) if !staged_path.nil? && staged_path.exist? |
