On Sep 2, 4:36 pm, pcrespo <
pedro.crespoval...@gmail.com> wrote:
> I uninstalled bitten and re-installed the latest trunk as you
> suggested.
>
> Then I did the follow steps:
>
> a) Wrote the following recipe into example_recipe.xml:
>
> <step id="Example">
> <sh:exec file="echo" args="--config "Deploy-x64""/>
> <sh:exec file="echo" args="--config "Deploy|x64""/>
> <sh:exec file="echo" args="--config "Deploy|x64""/>
> </step>
>
> b) Run within the same folder bitten-slave as
>
> bitten-slave example_recipe.xml
I'm running mine against a test server, not using local execution that
I have seen before may not yield identical results. Running your step,
here is what I get in logs:
Windows:
--config Deploy-x64
--config "Deploy|x64"
--config "Deploy|x64"
OSX:
--config Deploy-x64
--config Deploy|x64
--config Deploy|x64
=> So, OSX (posix) seems to drop the quotes as you indicate.
I use -v on command-line to turn on verbose logging from the slave -
it gives additional output. Mine shows OSX executing:
[DEBUG ] Executing ['echo', '--config', 'Deploy-x64'], (pid = 3140)
[INFO ] --config Deploy-x64
With Windows looking identical
[DEBUG ] Executing ['echo', '--config', 'Deploy-x64'], (pid = 2832)
[INFO ] --config Deploy-x64
- but Windows still then includes the quotes in the output... So, it
looks like that is some difference in how echo works on the platforms
handle arguments and quotes. Quotes are after all used to split
arguments, and we do call the regular shlex.split() to split
arguments. To have the quotes carry meaning, what I did was to escape
them:
<sh:exec file="echo" args="--config \"Deploy|x64\""/>
Then OSX also included the quotes in output: --config "Deploy|x64"
... which of course did not work on Windows:
'x64\""' is not recognized as an internal or external command,
operable program or batch file.
That's all I got for now - like you I'll be interested in finding the
correct way to handle this cross-platform, including patching Bitten
if anyone has good ideas for how to make this work consistently.