diff options
author | Tim Smith <tsmith@chef.io> | 2021-05-08 16:16:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-08 16:16:12 -0700 |
commit | bb0114c0d250b0e87e2a7be0b50cc3dfb314da6d (patch) | |
tree | f7f2ac240903281e9190137a5ad1d98630aaae0a | |
parent | 9af5e4c7c91fb48818101cc012a17151ec019f21 (diff) | |
parent | d7694e6f11fb46f05047fd0f6f1e51ca963e6c0c (diff) | |
download | chef-bb0114c0d250b0e87e2a7be0b50cc3dfb314da6d.tar.gz |
Merge pull request #11553 from nvwls/silence-bundler-warning
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/chef/cookbook/gem_installer.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/chef/cookbook/gem_installer.rb b/lib/chef/cookbook/gem_installer.rb index d7c18627de..e892212e32 100644 --- a/lib/chef/cookbook/gem_installer.rb +++ b/lib/chef/cookbook/gem_installer.rb @@ -70,7 +70,11 @@ class Chef unless Chef::Config[:skip_gem_metadata_installation] # Add additional options to bundle install cmd = [ "bundle", "install", Chef::Config[:gem_installer_bundler_options] ] - so = shell_out!(cmd, cwd: dir, env: { "PATH" => path_with_prepended_ruby_bin }) + env = { + "PATH" => path_with_prepended_ruby_bin, + "BUNDLE_SILENCE_ROOT_WARNING" => "1", + } + so = shell_out!(cmd, cwd: dir, env: env) Chef::Log.info(so.stdout) end end |