提交 faa37c76 编写于 作者: M Matthew Draper

Merge pull request #19429 from mxhold/print_bundle_install_output_line_by_line

Print `bundle install` output in `rails new` as soon as it's available
* Print `bundle install` output in `rails new` as soon as it's available
Running `rails new` will now print the output of `bundle install` as
it is available, instead of waiting until all gems finish installing.
*Max Holder*
* Respect `pluralize_table_names` when generating fixture file.
Fixes #19519.
......
......@@ -315,10 +315,6 @@ def bundle_command(command)
# its own vendored Thor, which could be a different version. Running both
# things in the same process is a recipe for a night with paracetamol.
#
# We use backticks and #print here instead of vanilla #system because it
# is easier to silence stdout in the existing test suite this way. The
# end-user gets the bundler commands called anyway, so no big deal.
#
# We unset temporary bundler variables to load proper bundler and Gemfile.
#
# Thanks to James Tucker for the Gem tricks involved in this call.
......@@ -326,8 +322,12 @@ def bundle_command(command)
require 'bundler'
Bundler.with_clean_env do
output = `"#{Gem.ruby}" "#{_bundle_command}" #{command}`
print output unless options[:quiet]
full_command = %Q["#{Gem.ruby}" "#{_bundle_command}" #{command}]
if options[:quiet]
system(full_command, out: File::NULL)
else
system(full_command)
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册