Resolve relative include paths relative to the including Taskfile

Closes #823
Closes #822
This commit is contained in:
Bevan Arps
2022-07-26 10:10:16 +12:00
committed by Andrey Nering
parent 47c1bb6a5b
commit e396f4d06f
9 changed files with 140 additions and 20 deletions

View File

@@ -81,7 +81,7 @@ Some environment variables can be overriden to adjust Task behavior.
| Attribute | Type | Default | Description |
| - | - | - | - |
| `taskfile` | `string` | | The path for the Taskfile or directory to be included. If a directory, Task will look for files named `Taskfile.yml` or `Taskfile.yaml` inside that directory. |
| `taskfile` | `string` | | The path for the Taskfile or directory to be included. If a directory, Task will look for files named `Taskfile.yml` or `Taskfile.yaml` inside that directory. If a relative path, resolved relative to the directory containing the including Taskfile. |
| `dir` | `string` | The parent Taskfile directory | The working directory of the included tasks when run. |
| `optional` | `bool` | `false` | If `true`, no errors will be thrown if the specified file does not exist. |
@@ -129,7 +129,7 @@ tasks:
foobar:
- echo "foo"
- echo "bar"
baz:
cmd: echo "baz"
```