diff options
Diffstat (limited to 'lib/rubygems/commands/which_command.rb')
-rw-r--r-- | lib/rubygems/commands/which_command.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rubygems/commands/which_command.rb b/lib/rubygems/commands/which_command.rb index 18706afdf5..96eeb86288 100644 --- a/lib/rubygems/commands/which_command.rb +++ b/lib/rubygems/commands/which_command.rb @@ -35,7 +35,7 @@ requiring to see why it does not behave as you expect. end def execute - found = false + found = true options[:args].each do |arg| arg = arg.sub(/#{Regexp.union(*Gem.suffixes)}$/, '') @@ -56,9 +56,10 @@ requiring to see why it does not behave as you expect. if paths.empty? then alert_error "Can't find ruby library file or shared library #{arg}" + + found &&= false else say paths - found = true end end |