1
0
mirror of https://github.com/go-task/task.git synced 2025-11-25 22:32:55 +02:00

cyclic: refactor to return error instead

This commit is contained in:
Andrey Nering
2017-07-08 10:13:56 -03:00
parent 9bea80b862
commit 06031efc09
4 changed files with 19 additions and 21 deletions

View File

@@ -61,8 +61,8 @@ type Task struct {
// Run runs Task
func (e *Executor) Run(args ...string) error {
if e.HasCyclicDep() {
return ErrCyclicDependencyDetected
if err := e.CheckCyclicDep(); err != nil {
return err
}
if e.Stdin == nil {