[Buildbot-devel] command in double quotes and not single quotes

Kai Blin kai.blin at gmail.com
Fri Aug 22 07:16:06 UTC 2008


On Friday 22 August 2008 07:28:31 Raja.Pavan.Kumar.G wrote:
> This problem is fixed, I changed the syntax of shell command
>
> It has to be enclosed in double quotes and not in single quotes

No. There's one other crucial difference here.

>
> Failed f1.addStep(shell.ShellCommand, description= "chdir", command=
> ['cd','./tempGitBranch'])
      ^^^

This is a list of strings.

> Succeeded
>
> f1.addStep(shell.ShellCommand, description= "chdir", command=
> ["cd ./tempGitBranch"])

This is one string (arguably in a list, but a single string nontheless).
So while the first is passed to the process without change and fails, because 
as explained previously, cd needs a shell, which is not created on a list of 
arguments, the second one is treated like the "one string" case, and 
ShellCommand spawns a shell to execute the command in. I'm pretty sure that 
single or double quotes don't make any difference if you preserve the number 
of arguments.

Cheers,
Kai

-- 
Kai Blin
WorldForge developer  http://www.worldforge.org/
Wine developer        http://wiki.winehq.org/KaiBlin
Samba team member     http://www.samba.org/samba/team/
--
Will code for cotton.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://buildbot.net/pipermail/devel/attachments/20080822/473cab30/attachment.bin>


More information about the devel mailing list