aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2011-06-10 04:38:23 +0900
committerAndre Arko <andre@arko.net>2011-06-11 22:31:44 -0700
commit43bd22e8f58584d3abef9cc3fd306983a30bd0e8 (patch)
tree3d1ae1c15b3f6d4b4b5d4f3f2697e9a00845c4e7 /lib
parentb27c2fb4c56e682fd70194202ba95dc94757f9fb (diff)
downloadbundler-43bd22e8f58584d3abef9cc3fd306983a30bd0e8.tar.gz
subcommand name in ARGV can be a shorthand
be sure to check subcommand name after the completion
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/cli.rb2
-rw-r--r--lib/bundler/vendor/thor/parser/options.rb4
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/bundler/cli.rb b/lib/bundler/cli.rb
index 2c6e9926..9d53384a 100644
--- a/lib/bundler/cli.rb
+++ b/lib/bundler/cli.rb
@@ -14,7 +14,7 @@ module Bundler
Bundler.rubygems.ui = UI::RGProxy.new(Bundler.ui)
end
- check_unknown_options! unless ARGV.include?("exec") || ARGV.include?("config")
+ check_unknown_options!
default_task :install
class_option "no-color", :type => :boolean, :banner => "Disable colorization in output"
diff --git a/lib/bundler/vendor/thor/parser/options.rb b/lib/bundler/vendor/thor/parser/options.rb
index 37062d70..9b1d042d 100644
--- a/lib/bundler/vendor/thor/parser/options.rb
+++ b/lib/bundler/vendor/thor/parser/options.rb
@@ -85,7 +85,9 @@ class Thor
end
def check_unknown!
- raise UnknownArgumentError, "Unknown switches '#{@unknown.join(', ')}'" unless @unknown.empty?
+ unless ARGV.include?("exec") || ARGV.include?("config")
+ raise UnknownArgumentError, "Unknown switches '#{@unknown.join(', ')}'" unless @unknown.empty?
+ end
end
protected