summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <[email protected]>2025-01-27 20:08:56 +0100
committerHiroshi SHIBATA <[email protected]>2025-01-31 14:34:29 +0900
commit56e2ef24680424fd9392ad82a9cc852d9549b942 (patch)
treee4bf94c242f5cdd7c196c384af57e46eba71fb4b /lib
parent3cff46c521668a67572ee1ed7ae23de2fd39fddd (diff)
[rubygems/rubygems] Fix `bundle console` unnecessarily trying to load IRB twice
https://github.com/rubygems/rubygems/commit/f9bf58573f
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/cli/console.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/bundler/cli/console.rb b/lib/bundler/cli/console.rb
index a93c750b22..f6389e8ea0 100644
--- a/lib/bundler/cli/console.rb
+++ b/lib/bundler/cli/console.rb
@@ -20,9 +20,14 @@ module Bundler
require name
get_constant(name)
rescue LoadError
- Bundler.ui.error "Couldn't load console #{name}, falling back to irb"
- require "irb"
- get_constant("irb")
+ if name == "irb"
+ Bundler.ui.error "#{name} is not available"
+ exit 1
+ else
+ Bundler.ui.error "Couldn't load console #{name}, falling back to irb"
+ name = "irb"
+ retry
+ end
end
def get_constant(name)