Issue #23124 has been updated by Melissa Stone.

Released in Puppet 3.4.0-rc1

----------------------------------------
Bug #23124: Puppet does not accurately capture exit codes from exec resources 
on Windows
https://projects.puppetlabs.com/issues/23124#change-100703

* Author: Rob Reynolds
* Status: Closed
* Priority: Normal
* Assignee: Rob Reynolds
* Category: 
* Target version: 3.4.0
* Affected Puppet version: 
* Keywords: windows
* Branch: https://github.com/puppetlabs/puppet/pull/2068
----------------------------------------
The exit code from a windows program is not returned correctly to due to a ruby 
bug which can be seen here:
https://bugs.ruby-lang.org/issues/8083
So, the exitcode that is returned follows the formula: exitcode % 256

    exitcode = 255 and puppet returns 255
    exitcode = 256 and puppet returns 0
    exitcode =257 and puppet returns 1

The issue can be reproduced by making a bat file that contains just the 
following `exit %1` and using the following puppet code:
exec

<pre>
{ 'testBat': command => 'c:\Windows\System32\cmd.exe /c 
c:\users\nick\documents\test.bat 257', logoutput => true, returns => 
[0,2000,3010], }
</pre>



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to