Skip to content

Commit 2e40616

Browse files
authored
Merge pull request rails#49490 from stevepolitodesign/sp-improve-generator-logging
Improve `Rails::Generators::Actions` logging and debugging
2 parents 2c8428c + 2b4909b commit 2e40616

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

railties/test/generators/actions_test.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,11 @@ def test_log_with_status_with_quiet
720720

721721
private
722722
def action(...)
723-
capture(:stdout) { generator.send(...) }
723+
if ENV["RAILS_LOG_TO_STDOUT"] == "true"
724+
generator.send(...)
725+
else
726+
capture(:stdout) { generator.send(...) }
727+
end
724728
end
725729

726730
def revoke(...)

0 commit comments

Comments
 (0)