From 12babf4204ce1e1a46ef62bbe284856630cb07be Mon Sep 17 00:00:00 2001 From: Sascha Andres Date: Thu, 9 Mar 2017 17:18:46 +0100 Subject: [PATCH 1/2] Support for a default branch --- task.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/task.go b/task.go index 1896291a74..f0c14b8706 100644 --- a/task.go +++ b/task.go @@ -54,7 +54,8 @@ func Run() { args := pflag.Args() if len(args) == 0 { - log.Fatal("task: No argument given") + log.Println("task: No argument given, trying default task") + args = []string{"default"} } var err error From ff2a442f938325750f9bb7e3cbc12fe562e10b6e Mon Sep 17 00:00:00 2001 From: Sascha Andres Date: Fri, 10 Mar 2017 08:42:38 +0100 Subject: [PATCH 2/2] Added README info for default task --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a7d07281a7..e0526ab5d3 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ task assets build If Bash is available (Linux and Windows while on Git Bash), the commands will run in Bash, otherwise will fallback to `cmd` (on Windows). +If you ommit a task name a name of default will be assumed. ### Environment You can specify environment variables that are added when running a command: