[Buildbot-devel] ShellCommand is failing when running with certain parameter

Marc-Antoine Ruel maruel at chromium.org
Thu Aug 22 14:17:54 UTC 2013


On Windows, use the caret ^ to escape a character.

M-A


2013/8/22 Charles Lepple <clepple at gmail.com>

> On Aug 22, 2013, at 8:52 AM, Maria Marcano wrote:
>
> > but I'm not sure how to fix this on the slave side because how could we
> distinguish from running
> >
> > something like echo %username%  (were we don't need to escape %) or a
> command like  git log --format=%H -1 -- (where we need to escape)
>
> It isn't exactly the same situation (due to quoting), but on non-Windows
> systems, passing a single string means "let the shell interpret the
> command" (akin to calling system() in C with a string), whereas passing a
> list of strings means "assign each string to an element of argv without
> interpretation" (like passing a list to exec*()). There is code in Buildbot
> to emulate these semantics on Windows as well (see lines 416-426 in
> runprocess.py).
>
> So at first glance, I'd say your code for converting '%' to '%%' could go
> in the Windows list-of-strings portion, and otherwise, '%' would be passed
> to the shell so that environment variables could be expanded on the slave
> side. It sounds like you would still keep the git command line as a list of
> strings, and that should work on all platforms. I don't have a Windows
> system handy to test any of the other corner cases, though.
>
> --
> Charles Lepple
> clepple at gmail
>
>
>
>
>
> ------------------------------------------------------------------------------
> Introducing Performance Central, a new site from SourceForge and
> AppDynamics. Performance Central is your source for news, insights,
> analysis and resources for efficient Application Performance Management.
> Visit us today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20130822/4126e97e/attachment.html>


More information about the devel mailing list