summaryrefslogtreecommitdiff
path: root/lib/chef/cookbook/gem_installer.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/cookbook/gem_installer.rb')
-rw-r--r--lib/chef/cookbook/gem_installer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/cookbook/gem_installer.rb b/lib/chef/cookbook/gem_installer.rb
index b9bf0ec73f..741ea5d208 100644
--- a/lib/chef/cookbook/gem_installer.rb
+++ b/lib/chef/cookbook/gem_installer.rb
@@ -50,7 +50,7 @@ class Chef
File.open("#{dir}/Gemfile", "w+") do |tf|
tf.puts "source '#{Chef::Config[:rubygems_url]}'"
cookbook_gems.each do |args|
- tf.puts "gem #{args.map { |i| "'#{i}'" }.join(' ')}"
+ tf.puts "gem(*#{args.inspect})"
end
tf.close
so = shell_out!("bundle install", cwd: dir, env: { "PATH" => path_with_prepended_ruby_bin })