aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-08-14 20:11:40 -0500
committerJack Nagel2013-08-14 20:11:40 -0500
commit3ecf7269fad1c8cbe7b45105e17a60727cd4bc9d (patch)
tree3a39f75396eaebc2ab62910bbec22aa6514777ea /Library
parentcf20b99182e163052ee99c14c9ed569d4cc64093 (diff)
downloadhomebrew-3ecf7269fad1c8cbe7b45105e17a60727cd4bc9d.tar.bz2
unpack: use ARGV.value
Diffstat (limited to 'Library')
-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