Fix bug in includes where default taskfiles were not being checked.

This commit is contained in:
tylermmorton
2022-02-21 15:31:55 -05:00
parent 7cdf0000d9
commit 1f1275255c
9 changed files with 28 additions and 9 deletions

View File

@@ -76,6 +76,13 @@ func Taskfile(readerNode *ReaderNode) (*taskfile.Taskfile, error) {
if !filepath.IsAbs(path) {
path = filepath.Join(readerNode.Dir, path)
}
path, err = exists(path)
if err != nil {
if includedTask.Optional {
return nil
}
return err
}
includeReaderNode := &ReaderNode{
Dir: filepath.Dir(path),