Skip to content

Commit

Permalink
WithoutSource should not treat .metadata as a staged_path`. (Home…
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus authored and Jonathan Dahan committed Sep 24, 2016
1 parent d1fe302 commit e32f6e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/hbc/installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def purge_versioned_files
odebug "Purging files for version #{@cask.version} of Cask #{@cask}"

# versioned staged distribution
gain_permissions_remove(@cask.staged_path) if @cask.staged_path.exist?
gain_permissions_remove(@cask.staged_path) if !@cask.staged_path.nil? && @cask.staged_path.exist?

# Homebrew-Cask metadata
if @cask.metadata_versioned_container_path.respond_to?(:children) &&
Expand Down
2 changes: 1 addition & 1 deletion lib/hbc/without_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class Hbc::WithoutSource < Hbc::Cask
# Override from `Hbc::DSL` because we don't have a cask source file to work
# with, so we don't know the cask's `version`.
def staged_path
caskroom_path.children.first
(caskroom_path.children - [metadata_master_container_path]).first
end

def to_s
Expand Down

0 comments on commit e32f6e8

Please sign in to comment.