Requiring Confirmation for Recipes
just normally executes all recipes unless there is an error. The [confirm]
attribute1.17.0 allows recipes to require confirmation in the terminal
prior to running. This can be overridden by passing --yes to just, which
will automatically confirm any recipes marked by this attribute.
Recipes dependent on a recipe that requires confirmation will not be run if the relied upon recipe is not confirmed, as well as recipes passed after any recipe that requires confirmation.
[confirm]
delete-all:
rm -rf *
Custom Confirmation Prompt
The default confirmation prompt can be overridden with
[confirm(PROMPT)]1.23.0:
[confirm("Are you sure you want to delete everything?")]
delete-everything:
rm -rf *
The confirmation prompt may also be an expression1.49.0 which may reference assignments or recipe arguments:
[confirm("Deploy to " + env + "?")]
deploy env:
echo 'Deploying to {{env}}...'