Skip to content

Commit

Permalink
Merge pull request #16 from go-task/feature/default-task
Browse files Browse the repository at this point in the history
Support for a default task
  • Loading branch information
sascha-andres authored Mar 10, 2017
2 parents 53234b9 + ff2a442 commit 678ea86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion task.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 678ea86

Please sign in to comment.