aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/generators/app_base.rb8
-rw-r--r--railties/test/generators/app_generator_test.rb2
2 files changed, 5 insertions, 5 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb
index 4dc4d27a46..f3b99ff937 100644
--- a/railties/lib/rails/generators/app_base.rb
+++ b/railties/lib/rails/generators/app_base.rb
@@ -364,7 +364,7 @@ module Rails
gems
end
- def bundle_command(command)
+ def bundle_command(command, env = {})
say_status :run, "bundle #{command}"
# We are going to shell out rather than invoking Bundler::CLI.new(command)
@@ -381,9 +381,9 @@ module Rails
Bundler.with_clean_env do
full_command = %Q["#{Gem.ruby}" "#{_bundle_command}" #{command}]
if options[:quiet]
- system(full_command, out: File::NULL)
+ system(env, full_command, out: File::NULL)
else
- system(full_command)
+ system(env, full_command)
end
end
end
@@ -417,7 +417,7 @@ module Rails
end
def run_bundle
- bundle_command("install") if bundle_install?
+ bundle_command("install", "BUNDLE_IGNORE_MESSAGES" => "1") if bundle_install?
end
def run_webpack
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index 32d00f3157..154cd3e80c 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -1059,7 +1059,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
end
def assert_bundler_command_called(target_command)
- command_check = -> command do
+ command_check = -> (command, env = {}) do
@command_called ||= 0
case command