Skip to content

Commit 4e73bbf

Browse files
committed
invoke chef-client as ruby chef-client because windows
Windows doesn't shebang, resulting in "BLAH is not recognized as an internal or external command, operable program or batch file." error.
1 parent ed25438 commit 4e73bbf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec/integration/client/client_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
EOM
1616

1717
chef_dir = File.join(File.dirname(__FILE__), "..", "..", "..", "bin")
18-
result = shell_out("chef-client -c \"#{path_to('config/client.rb')}\" -o 'x::default'", :cwd => chef_dir)
18+
result = shell_out("ruby #{chef_dir}/chef-client -c \"#{path_to('config/client.rb')}\" -o 'x::default'", :cwd => chef_dir)
1919
result.error!
2020
end
2121

@@ -151,7 +151,7 @@
151151
EOM
152152

153153
chef_dir = File.join(File.dirname(__FILE__), "..", "..", "..", "bin")
154-
result = shell_out("#{chef_dir}/chef-client -c \"#{path_to('config/client.rb')}\" arbitrary.rb", :cwd => path_to(''))
154+
result = shell_out("ruby #{chef_dir}/chef-client -c \"#{path_to('config/client.rb')}\" arbitrary.rb", :cwd => path_to(''))
155155
result.error!
156156

157157
IO.read(path_to('tempfile.txt')).should == '1'
@@ -176,7 +176,7 @@ class ::Blah
176176
EOM
177177

178178
chef_dir = File.join(File.dirname(__FILE__), "..", "..", "..", "bin")
179-
result = shell_out("#{chef_dir}/chef-client -c \"#{path_to('config/client.rb')}\" -o x::constant_definition arbitrary.rb", :cwd => path_to(''))
179+
result = shell_out("ruby #{chef_dir}/chef-client -c \"#{path_to('config/client.rb')}\" -o x::constant_definition arbitrary.rb", :cwd => path_to(''))
180180
result.error!
181181

182182
IO.read(path_to('tempfile.txt')).should == '1'

0 commit comments

Comments
 (0)