Menu

1 / 2

Load Thor when Bundler's shell first prints by linyiru · Pull Request #10005 · ruby/rubygems

GitHub Public Timeline Feed·shell·8 days ago
#3NWkAjgl
Reading 0:00
15s threshold
Bundler::UI::Shell built its Thor shell in initialize, so creating
Bundler.ui loaded the vendored Thor, 23 files. `require "bundler/setup"`
creates it and then silences it, so every application boot compiled
Thor without printing anything.

Build the Thor shell on first use. The CLI still builds it up front,
since --no-color has to reach Thor::Base.shell before Thor prints help.
Installer used Thor::Util without requiring Thor, relying on the shell
having loaded it, so require it there.