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
Tasks that have defined pre-tasks will automatically run said pre-tasks when invoked. However, it will bail on the first non-zero exit, so if a task defines 2 pre-tasks (e.g. @task(aliases=["l"], pre=[lint_python, lint_yaml])), the second one will not be invoked if the first one fails.
pre-tasks are great for doing certain setup things (cleaning up test files before a run, or generating coverage before opening a cov report) but not as an aggregator intended to run multiple things.
There may be better ways to run multiple tasks, but I've found the approach we've been using in our dotfiles to work pretty well
Tasks that have defined pre-tasks will automatically run said pre-tasks when invoked. However, it will bail on the first non-zero exit, so if a task defines 2 pre-tasks (e.g. @task(aliases=["l"], pre=[lint_python, lint_yaml])), the second one will not be invoked if the first one fails.
pre-tasks are great for doing certain setup things (cleaning up test files before a run, or generating coverage before opening a cov report) but not as an aggregator intended to run multiple things.
There may be better ways to run multiple tasks, but I've found the approach we've been using in our dotfiles to work pretty well
https://github.com/swellaby/dotfiles/blob/8356cf7c4a27aeb306432b18430c810cab925bf7/tasks.py#L105-L119
The text was updated successfully, but these errors were encountered: