summaryrefslogtreecommitdiff
path: root/lib/bundler/cli/list.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/cli/list.rb')
-rw-r--r--lib/bundler/cli/list.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/cli/list.rb b/lib/bundler/cli/list.rb
index 47d512eb70..c92f05df07 100644
--- a/lib/bundler/cli/list.rb
+++ b/lib/bundler/cli/list.rb
@@ -9,7 +9,7 @@ module Bundler
def run
specs = Bundler.load.specs.reject {|s| s.name == "bundler" }.sort_by(&:name)
- return Bundler.ui.error "The `--name-only` and `--paths` options cannot be used together" if @options["name-only"] && @options["paths"]
+ raise InvalidOption, "The `--name-only` and `--paths` options cannot be used together" if @options["name-only"] && @options["paths"]
return specs.each {|s| Bundler.ui.info s.name } if @options["name-only"]
return specs.each {|s| Bundler.ui.info s.full_gem_path } if @options["paths"]