Command::InstallCommand: print explanation when a command is not found

Don't raise `NoMethodError`.
This commit is contained in:
Kyrylo Silin 2013-02-20 13:06:17 +02:00
parent 5ff295c283
commit ca74c876ed
1 changed files with 5 additions and 0 deletions

View File

@ -15,6 +15,11 @@ class Pry
require 'rubygems/dependency_installer' unless defined? Gem::DependencyInstaller
command = find_command(name)
unless command
output.puts "Command #{ text.green(name) } is not found"
return
end
if command_dependencies_met?(command.options)
output.puts "Dependencies for #{ text.green(name) } are met. Nothing to do"
return