aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Contributions
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Contributions')
-rwxr-xr-xLibrary/Contributions/cmd/brew-unpack.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/Library/Contributions/cmd/brew-unpack.rb b/Library/Contributions/cmd/brew-unpack.rb
index 64621a393..86cf4018a 100755
--- a/Library/Contributions/cmd/brew-unpack.rb
+++ b/Library/Contributions/cmd/brew-unpack.rb
@@ -66,11 +66,10 @@ changes.
formulae = ARGV.formulae
raise FormulaUnspecifiedError if formulae.empty?
- unpack_dir = ARGV.options_only.select {|o| o.start_with? "--destdir="}
- if unpack_dir.empty?
- unpack_dir = Pathname.new Dir.getwd
+ if (dir = ARGV.value('destdir')).nil?
+ unpack_dir = Pathname.pwd
else
- unpack_dir = Pathname.new(unpack_dir.first.split('=')[1]).realpath
+ unpack_dir = Pathname.new(dir).realpath
unpack_dir.mkpath unless unpack_dir.exist?
end