aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMarkus Reiter2017-10-02 14:21:45 +0200
committerGitHub2017-10-02 14:21:45 +0200
commite3226638365713b7f9ea45f8a63322baa7dd1941 (patch)
treed32cc93fd2b54b6ee62e246db078d8885f91c121 /Library
parent23da0aa7fb91c68807e1278b2f858beefe5ea35a (diff)
parentda66e06068e73ea212feaf6657c37e96f6bcde2c (diff)
downloadbrew-e3226638365713b7f9ea45f8a63322baa7dd1941.tar.bz2
Merge pull request #3255 from reitermarkus/summarize
Add missing `summarize` method.
Diffstat (limited to 'Library')
-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 d0b2eb6ef..3f63dae8f 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)