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

@@ -207,6 +207,14 @@ func (e *Executor) Setup() error {
}
}
if v < 3 {
for _, taskfile := range e.Taskfile.Includes {
if taskfile.AdvancedImport {
return errors.New(`task: Import with additional parameters is only available starting on Taskfile version v3`)
}
}
}
e.taskCallCount = make(map[string]*int32, len(e.Taskfile.Tasks))
e.mkdirMutexMap = make(map[string]*sync.Mutex, len(e.Taskfile.Tasks))
for k := range e.Taskfile.Tasks {