1
0
mirror of https://github.com/go-task/task.git synced 2025-07-15 01:35:00 +02:00

Fixed absolute path resolving for included tasksfile

This commit is contained in:
Evgeny Abramovich
2020-02-15 18:07:09 +03:00
parent 17ad7060b3
commit 0acb911d6a

View File

@ -29,7 +29,12 @@ func Taskfile(dir string, entrypoint string) (*taskfile.Taskfile, error) {
}
for namespace, includedTask := range t.Includes {
path = filepath.Join(dir, includedTask.Taskfile)
if filepath.IsAbs(includedTask.Taskfile) {
path = includedTask.Taskfile
} else {
path = filepath.Join(dir, includedTask.Taskfile)
}
info, err := os.Stat(path)
if err != nil {
return nil, err