1
0
mirror of https://github.com/go-task/task.git synced 2025-06-29 00:51:43 +02:00

Issue #519: Allow includes to be optional

This commit is contained in:
Sally Young
2021-08-11 17:28:44 +01:00
parent 50e5813222
commit 8f80fc4e2c
8 changed files with 93 additions and 1 deletions

View File

@ -154,6 +154,24 @@ includes:
> This was a deliberate decision to keep use and implementation simple.
> If you disagree, open an GitHub issue and explain your use case. =)
### Optional includes
Includes marked as optional will allow Task to continue execution as normal if
the included file is missing.
```yaml
version: '3'
includes:
tests:
taskfile: ./tests/Taskfile.yml
optional: true
tasks:
greet:
cmds:
- echo "This command can still be successfully executed if ./tests/Taskfile.yml does not exist"
```
## Task directory
By default, tasks will be executed in the directory where the Taskfile is