Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Commit 18f9b66

Browse files
committed
Merge pull request #58 from Genius/master
Pour bottles to the correct directory
2 parents 153bcc9 + 37463a5 commit 18f9b66

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

files/boxen-bottle-hooks.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,11 @@ def self.pour(formula)
4949
success = system "curl", "--fail", "--progress-bar", "--output", cache_file, url
5050
raise "Boxen: Failed to download resource \"#{name}\"" unless success
5151

52-
ohai "Boxen: Pouring #{file}"
53-
system "tar", "-xf", cache_file, "-C", HOMEBREW_CELLAR
52+
bottle_install_dir = formula.prefix
53+
bottle_install_dir.mkpath
54+
55+
ohai "Boxen: Pouring #{file} to #{bottle_install_dir}"
56+
system "tar", "-xf", cache_file, "-C", bottle_install_dir, "--strip-components=2"
5457

5558
true
5659
end

0 commit comments

Comments
 (0)