lib/chef/knife/bootstrap_windows_base.rb in knife-windows-0.5.8 vs lib/chef/knife/bootstrap_windows_base.rb in knife-windows-0.5.10.rc.1
- old
+ new
@@ -133,10 +133,14 @@
ui.info("Bootstrapping Chef on #{ui.color(@node_name, :bold)}")
# create a bootstrap.bat file on the node
# we have to run the remote commands in 2047 char chunks
create_bootstrap_bat_command do |command_chunk, chunk_num|
- run_command("cmd.exe /C echo \"Rendering '#{bootstrap_bat_file}' chunk #{chunk_num}\" && #{command_chunk}").run
+ begin
+ run_command("cmd.exe /C echo \"Rendering '#{bootstrap_bat_file}' chunk #{chunk_num}\" && #{command_chunk}").run
+ rescue SystemExit => e
+ raise unless e.success?
+ end
end
# execute the bootstrap.bat file
run_command(bootstrap_command).run
end