diff options
author | Stephen Delano <stephen@opscode-stephen.local> | 2010-03-26 13:51:44 -0700 |
---|---|---|
committer | Stephen Delano <stephen@opscode-stephen.local> | 2010-03-26 13:51:44 -0700 |
commit | 7def4b217351212782f9214dac9dd2f1a8de78af (patch) | |
tree | 53644c48791fb17b4a72afc6f3bce3c7a482c9cd /lib | |
parent | 5e317d8b0aeca0c8718c4c80c7afeb27d7f339f8 (diff) | |
download | mixlib-cli-7def4b217351212782f9214dac9dd2f1a8de78af.tar.gz |
moving argv.dup to top of parse_options to preserve return behavior
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mixlib/cli.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/mixlib/cli.rb b/lib/mixlib/cli.rb index e5daf14..31eb3d9 100644 --- a/lib/mixlib/cli.rb +++ b/lib/mixlib/cli.rb @@ -118,6 +118,7 @@ module Mixlib # === Returns # argv<Array>:: Returns any un-parsed elements. def parse_options(argv=ARGV) + argv = argv.dup @opt_parser = OptionParser.new do |opts| # Set the banner opts.banner = banner @@ -158,7 +159,7 @@ module Mixlib opts.send(*full_opt) end end - @opt_parser.parse!(argv.dup) + @opt_parser.parse!(argv) # Deal with any required values options.each do |opt_key, opt_value| |