You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In make, one can prepend "-" to mark a command which is allowed to fail and will not break the whole task execution.
E.g. following (modified) snippet from Makefile for building PDF documentation tries few times command pdflatex (and all must succeed), then it tries command makeindex, which is allowed to fail without breaking whole task execution, and finally gives few more executions of pdflatex.
@schettino72 Sorry for still adding content here, but my attempt to add this as a message to the discussion group seems to have no effect so far (I added it over web interface while being signed in and being marked as a member).
Some ideas and proposals for case it is not possible (yet):
def task_shaker():
"""Does something, survives particular failures"""
return
{
"actions": [
# simply prefix "-" to the command string
"-makeindex -s python.ist data.idx",
# "-" first item for cmd arg list
["-", "makeindex", "-s", "python.ist", "data.idx"],
# CmdAction arg fail_safe=True
CmdAction("makeindex -s python.ist data.idx", fail_safe=True),
# "-" prefix recognized even in CmdAction
CmdAction("-makeindex -s python.ist data.idx", cwd=subdir),
# CmdFailSafe wrapps cmd-action failure, always pretends success
CmdFailSafe("makeindex -s python.ist data.idx", cwd=subdir),
# failsafe wrapps python-actions, always pretends success
failsafe(makeindex, args, kwargs),
# minus prefix in cmd-action tupple variant
("-", "makeindex -s python.ist data.idx"),
# minus in terms "next one to fail safe"
"-",
"makeindex -s python.ist data.idx",
# the same, just written on one line
"-", "makeindex -s python.ist data.idx",
# minus as "next one to fail safe" works for python-action too
"-", (makeindex, args, kwargs),
]
}
My preference (from dodo.py author point of view) would be whatever uses the "-".
Last two would suffice
Any other "-" related ones two would be easy to understand.
Adding too many other options could be counter productive but could be done if there are good reasons for that.
In
make
, one can prepend "-" to mark a command which is allowed to fail and will not break the whole task execution.E.g. following (modified) snippet from Makefile for building PDF documentation tries few times command
pdflatex
(and all must succeed), then it tries commandmakeindex
, which is allowed to fail without breaking whole task execution, and finally gives few more executions ofpdflatex
.Question: is such an option available in
doit
?The text was updated successfully, but these errors were encountered: