1
0
mirror of https://github.com/go-task/task.git synced 2025-01-26 05:27:15 +02:00

Merge pull request #16 from go-task/feature/default-task

Support for a default task
This commit is contained in:
Sascha Andres 2017-03-10 08:43:05 +01:00 committed by GitHub
commit 678ea86350
2 changed files with 3 additions and 1 deletions

View File

@ -42,6 +42,7 @@ task assets build
If Bash is available (Linux and Windows while on Git Bash), the commands will If Bash is available (Linux and Windows while on Git Bash), the commands will
run in Bash, otherwise will fallback to `cmd` (on Windows). run in Bash, otherwise will fallback to `cmd` (on Windows).
If you ommit a task name a name of default will be assumed.
### Environment ### Environment
You can specify environment variables that are added when running a command: You can specify environment variables that are added when running a command:

View File

@ -54,7 +54,8 @@ func Run() {
args := pflag.Args() args := pflag.Args()
if len(args) == 0 { 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 var err error