1
0
mirror of https://github.com/go-task/task.git synced 2025-11-23 22:24:45 +02:00

refactor: join task and vars parameters in a single Call struct

This commit is contained in:
Andrey Nering
2017-07-08 14:34:17 -03:00
parent a1140aa62f
commit 7a7f66dfdc
4 changed files with 58 additions and 52 deletions

View File

@@ -15,7 +15,7 @@ func (e *Executor) watchTasks(args ...string) error {
// run tasks on init
for _, a := range args {
if err := e.RunTask(context.Background(), a, nil); err != nil {
if err := e.RunTask(context.Background(), Call{Task: a}); err != nil {
e.println(err)
break
}
@@ -41,7 +41,7 @@ loop:
select {
case <-watcher.Events:
for _, a := range args {
if err := e.RunTask(context.Background(), a, nil); err != nil {
if err := e.RunTask(context.Background(), Call{Task: a}); err != nil {
e.println(err)
continue loop
}