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

Maria Marcano mariangemarcano at gmail.com
Wed Aug 21 12:54:25 UTC 2013


Johannes, that doesn't work, throws fatal: invalid --pretty format: \H


Greetings,

*Maria Marcano*
-------------------------------------------------
*Software Developer  *
*Find me on*
*linkedin <http://www.linkedin.com/in/mariangemarcano> |
blogger<http://mariangemarcano.blogspot.com/>
 | twitter <http://twitter.com/mariangemarcano/>*


On Wed, Aug 21, 2013 at 2:48 PM, Johannes Ring <johannr at simula.no> wrote:

> On Wed, Aug 21, 2013 at 2:36 PM, Maria Marcano
> <mariangemarcano at gmail.com> wrote:
> > The following command is failing
> >
> > factory.addStep(ShellCommand(command=['git', 'log', '--format=%H', '-1',
> > '--'], workdir="build/gitrepo"))
> >
> > with the error
> >
> >  fatal: invalid --pretty format: H
> >
> > the error occurs on windows 7 machine, it doesn't happen when it runs on
> > mac.
> >
> >
> > if I run the command in a terminal on windows 7 git log --format=%H -1 --
> >
> > it doesn't fail, it looks like the issue is the parameter "%H"
> >
> > because running factory.addStep(ShellCommand(command=['git', 'log',
>  '-1',
> > '--'], workdir="build/gitrepo"))
> >
> > doesn't fail
> >
> > Do you know how this can be fixed?
>
> Have you tried to escape the % with a backslash? Like this:
>
> factory.addStep(ShellCommand(command=['git', 'log', '--format=\%H',
> '-1', '--'], workdir="build/gitrepo"))
>
> Johannes
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20130821/af8e097d/attachment.html>


More information about the devel mailing list