mirror of
https://github.com/go-task/task.git
synced 2026-06-26 22:26:13 +00:00
Fix bug of Task not executing the "default" task
When global vars were informed using the CLI. I took the oportunity to move this logic to the proper package and write a test.
This commit is contained in:
@@ -133,13 +133,7 @@ func main() {
|
||||
return
|
||||
}
|
||||
|
||||
arguments := pflag.Args()
|
||||
if len(arguments) == 0 {
|
||||
log.Println("task: No argument given, trying default task")
|
||||
arguments = []string{"default"}
|
||||
}
|
||||
|
||||
calls, globals := args.Parse(arguments...)
|
||||
calls, globals := args.Parse(pflag.Args()...)
|
||||
for name, value := range globals {
|
||||
e.Taskfile.Vars[name] = value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user