1
0
mirror of https://github.com/go-task/task.git synced 2025-06-25 00:47:04 +02:00

Added version validation and updated tests

This commit is contained in:
Evgeny Abramovich
2020-02-15 17:24:06 +03:00
parent f38ba7fcd3
commit 17ad7060b3
6 changed files with 48 additions and 5 deletions

View File

@ -45,9 +45,11 @@ func Taskfile(dir string, entrypoint string) (*taskfile.Taskfile, error) {
return nil, ErrIncludedTaskfilesCantHaveIncludes
}
for _, task := range includedTaskfile.Tasks {
if !filepath.IsAbs(task.Dir) {
task.Dir = filepath.Join(includedTask.Dir, task.Dir)
if includedTask.AdvancedImport {
for _, task := range includedTaskfile.Tasks {
if !filepath.IsAbs(task.Dir) {
task.Dir = filepath.Join(includedTask.Dir, task.Dir)
}
}
}