- From: Daniel DeLeo <
>
- To:
- Subject: [chef] Re: Windows execute resource, not_if and exit code 42
- Date: Wed, 9 Nov 2011 00:02:01 -0800
On Tuesday, November 8, 2011 at 8:40 AM, Daniel Oliver wrote:
>
>
Hi chefs,
>
>
>
It appears that Windows commands executed with ShellOut are regularly
>
returning exit code 42 on success. I can work around this for the main
>
“execute” blocks by specifying the return code, but for those protected
>
with “not_if”, commands get run that shouldn’t be as the check performed is
>
exit_code!=0. For example, the following old block is near the top of my
>
run list (I realise that this could be replaced with a user block):
`not_if` and `only_if` actually use the older popen4 code (which we're slowly
phasing out) to run commands. I'm not aware of any windows-related changes to
this code since 0.9.x. Regardless, I'll look into fixing this for a new beta
release.
`execute` resources do, however, use ShellOut. Are you experiencing this
problem with execute resources in the 0.10.6 beta?
--
Dan DeLeo
Archive powered by MHonArc 2.6.16.