Rubygem: fix raising of CommandError for #install
Fix issue #870 (gem-install seems broken on jruby)
This commit is contained in:
parent
6b11eda3ad
commit
629bb75cc6
|
@ -69,10 +69,10 @@ class Pry
|
|||
installer.install(name)
|
||||
rescue Errno::EACCES
|
||||
raise CommandError,
|
||||
"Insufficient permissions to install #{ text.green(name) }."
|
||||
"Insufficient permissions to install #{ Pry::Helpers::Text.green(name) }."
|
||||
rescue Gem::GemNotFoundException
|
||||
raise CommandError,
|
||||
"Gem #{ text.green(name) } not found. Aborting installation."
|
||||
"Gem #{ Pry::Helpers::Text.green(name) } not found. Aborting installation."
|
||||
else
|
||||
Gem.refresh
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue