fix: reject include without taskfile or dir (#2892)

Co-authored-by: Valentin Maerten <maerten.valentin@gmail.com>
This commit is contained in:
qingyingliu
2026-07-01 12:48:47 -07:00
committed by GitHub
parent b5f671e098
commit b5861b1e27
4 changed files with 41 additions and 3 deletions

View File

@@ -718,11 +718,13 @@
"properties": {
"taskfile": {
"description": "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.",
"type": "string"
"type": "string",
"minLength": 1
},
"dir": {
"description": "The working directory of the included tasks when run.",
"type": "string"
"type": "string",
"minLength": 1
},
"optional": {
"description": "If `true`, no errors will be thrown if the specified file does not exist.",
@@ -758,7 +760,15 @@
"description": "The checksum of the file you expect to include. If the checksum does not match, the file will not be included.",
"type": "string"
}
}
},
"anyOf": [
{
"required": ["taskfile"]
},
{
"required": ["dir"]
}
]
}
]
}