Please review pull request #683: Fix Bug #14055 windows: normalize non-zero but successful MSI exit codes opened by (shawnl)
Description:
see http://msdn.microsoft.com/en-us/library/windows/desktop/aa368542%28v=vs.85%29.aspx
- Opened: Thu Apr 19 00:24:59 UTC 2012
- Based on: puppetlabs:master (b02aa930a03a282588e81f65e14f47a138a4b9f0)
- Requested merge: shawnl:master (f5852b6da3bdb6739824e77854602afc915722eb)
Diff follows:
diff --git a/lib/puppet/util/execution.rb b/lib/puppet/util/execution.rb
index 220cc46..464be62 100644
--- a/lib/puppet/util/execution.rb
+++ b/lib/puppet/util/execution.rb
@@ -117,6 +117,11 @@ def self.execute(command, arguments = {})
process_info = execute_windows(*exec_args)
begin
exit_status = Puppet::Util::Windows::Process.wait_process(process_info.process_handle)
+ # normalize success codes
+ # 0 ERROR_SUCCESS
+ # 1641 ERROR_SUCCESS_REBOOT_INITIATED
+ # 3010 ERROR_SUCCESS_REBOOT_REQUIRED
+ exit_status = 0 if [0,1641,3010].include?(exit_status)
ensure
Process.CloseHandle(process_info.process_handle)
Process.CloseHandle(process_info.thread_handle)
-- You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
