diff options
author | Tim Smith <tsmith@chef.io> | 2021-05-08 11:07:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-08 11:07:46 -0700 |
commit | 81a8b43d277094b04dd15247563dbbda427b1a43 (patch) | |
tree | 3efb47cc54e40a00cd1d5afee8dcf2f6578c8e1f | |
parent | ab480f476007120387590becf415099625c5e909 (diff) | |
parent | d59854cf717411e1c3c15674cc91cc118438af4a (diff) | |
download | chef-81a8b43d277094b04dd15247563dbbda427b1a43.tar.gz |
Merge pull request #11551 from nvwls/silence-bundler-warning
-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 |