aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib
diff options
context:
space:
mode:
authorMarkus Reiter2017-10-01 23:33:52 +0200
committerMarkus Reiter2017-10-01 23:33:52 +0200
commitda66e06068e73ea212feaf6657c37e96f6bcde2c (patch)
tree725ce2e26f98978e3249108649f78702af4bf82e /Library/Homebrew/cask/lib
parente86c79fbc01d08f73841a525d29c03c5243081fa (diff)
downloadbrew-da66e06068e73ea212feaf6657c37e96f6bcde2c.tar.bz2
Add missing `summarize` method.
Diffstat (limited to 'Library/Homebrew/cask/lib')
-rw-r--r--Library/Homebrew/cask/lib/hbc/artifact/abstract_uninstall.rb2
-rw-r--r--Library/Homebrew/cask/lib/hbc/artifact/nested_container.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/artifact/abstract_uninstall.rb b/Library/Homebrew/cask/lib/hbc/artifact/abstract_uninstall.rb
index badd549ce..19b83b69b 100644
--- a/Library/Homebrew/cask/lib/hbc/artifact/abstract_uninstall.rb
+++ b/Library/Homebrew/cask/lib/hbc/artifact/abstract_uninstall.rb
@@ -37,7 +37,7 @@ module Hbc
end
def summarize
- to_h.map { |key, val| [*val].map { |v| "#{key.inspect} => #{v.inspect}" }.join(", ") }.join(", ")
+ to_h.flat_map { |key, val| [*val].map { |v| "#{key.inspect} => #{v.inspect}" } }.join(", ")
end
private
diff --git a/Library/Homebrew/cask/lib/hbc/artifact/nested_container.rb b/Library/Homebrew/cask/lib/hbc/artifact/nested_container.rb
index 81adf9029..c9fd3dc27 100644
--- a/Library/Homebrew/cask/lib/hbc/artifact/nested_container.rb
+++ b/Library/Homebrew/cask/lib/hbc/artifact/nested_container.rb
@@ -16,6 +16,10 @@ module Hbc
private
+ def summarize
+ path.relative_path_from(cask.staged_path).to_s
+ end
+
def extract(command: nil, verbose: nil, **_)
container = Container.for_path(path, command)