mirror of
https://github.com/go-task/task.git
synced 2025-08-10 22:42:19 +02:00
feat: error handling for undefined schema version (#1342)
* feat: error handling for undefined schema version * docs: error codes * chore: changelog
This commit is contained in:
@@ -147,6 +147,11 @@ func Taskfile(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Check that the Taskfile is set and has a schema version
|
||||
if t == nil || t.Version == nil {
|
||||
return nil, &errors.TaskfileVersionNotDefined{URI: node.Location()}
|
||||
}
|
||||
|
||||
// Annotate any included Taskfile reference with a base directory for resolving relative paths
|
||||
if node, isFileNode := node.(*FileNode); isFileNode {
|
||||
_ = t.Includes.Range(func(key string, includedFile taskfile.IncludedTaskfile) error {
|
||||
|
Reference in New Issue
Block a user