Changes between Version 5 and Version 6 of FAQ


Ignore:
Timestamp:
Jul 20, 2010, 2:05:02 AM (9 years ago)
Author:
gward
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FAQ

    v5 v6  
    1010
    1111Consult the mailing list archives for discussion of various implementations of multi-project buildmasters.
     12
     13= Why don't wildcards work in my !ShellCommand? =
     14
     15Probably because your build slave is running a Unix variant and you wrote your command as a list (the recommended way):
     16{{{
     17factory.addStep(ShellCommand(
     18    command=["rm", "*.old"],
     19    ...))
     20}}}
     21
     22The advantage of writing your command as a list is that it is executed directly by !BuildBot, without a shell getting in the way.  That means you won't have problems with quoting or whitespace in filenames.  But since there is no shell involved, it also means that wildcards will not be expanded: !BuildBot simply passes the string `*.old` to `rm`, which complains because there is no such file.
     23
     24The solution is to specify your command as a string, so it will be run by `/bin/sh`:
     25{{{
     26factory.addStep(ShellCommand(
     27    command="rm *.old",
     28    ...))
     29}}}
     30However, this can introduce all the classic shell quoting nightmares.
     31
     32Alternately, you can get !BuildBot to explicitly run the command with `/bin/sh`:
     33{{{
     34factory.addStep(ShellCommand(
     35    command=["/bin/sh", "-c", "rm *.old"],
     36    ...))
     37}}}
    1238
    1339= Can I build a project that is composed of code from multiple repositories? =