From 39ad5e8574783dd9f32cd553a3d5854f844496c1 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Thu, 7 Apr 2016 12:49:18 -0700 Subject: tighten up the chdir logic --- lib/chef/cookbook/gem_installer.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/chef/cookbook') diff --git a/lib/chef/cookbook/gem_installer.rb b/lib/chef/cookbook/gem_installer.rb index 4b41951fe4..b074890b36 100644 --- a/lib/chef/cookbook/gem_installer.rb +++ b/lib/chef/cookbook/gem_installer.rb @@ -53,9 +53,7 @@ class Chef tf.puts "gem #{args.map { |i| "'#{i}'" }.join(' ')}" end tf.close - Dir.chdir(dir) do - so = shell_out!("bundle install") - end + so = shell_out!("bundle install", pwd: dir) end end rescue Exception => e -- cgit v1.2.1