We have @ and - sigils which control linewise recipe execution. I thought that we could consider having a "guard" sigil which indicates that an error on a particular line should terminate the execution of the current recipe, but not the whole run.
For example, to make a recipe only execute if the environment variable FOO is set to yes:
foo:
?[[ $FOO == yes]]
# the rest of the recipe
This is backwards incompatible, so would need a setting to opt-in to the new behavior. (Although it's unlikely to break most justfile, ? at the beginning of the line is unlikely in sh and derivatives, and I think most scripting languages that people are likely to use.)
We have
@and-sigils which control linewise recipe execution. I thought that we could consider having a "guard" sigil which indicates that an error on a particular line should terminate the execution of the current recipe, but not the whole run.For example, to make a recipe only execute if the environment variable
FOOis set toyes:This is backwards incompatible, so would need a setting to opt-in to the new behavior. (Although it's unlikely to break most
justfile,?at the beginning of the line is unlikely inshand derivatives, and I think most scripting languages that people are likely to use.)