Skip to content

Commit

Permalink
add check of CircleCI API token
Browse files Browse the repository at this point in the history
  • Loading branch information
y-yagi committed Jun 27, 2016
1 parent 6a7c2e2 commit f066783
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ func main() {
return cli.NewExitError(err.Error(), 1)
}

if c.String("circleci_api_token") == "" {
return cli.NewExitError("Please set CircleCI API token.", 1)
}

err = triggerBuild(c.String("circleci_api_token"), c.String("user"), c.String("repository"))
if err != nil {
return cli.NewExitError(err.Error(), 1)
Expand Down

0 comments on commit f066783

Please sign in to comment.