Skip to content

Commit

Permalink
Add a descriptive error for building no services.
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinChartier committed Jul 3, 2019
1 parent 047434b commit 6301fab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions commands/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ func buildCommandAction(cliContext *cli.Context) error {
return cli.NewExitError(err.Error(), 1)
}

if len(services) == 0 {
return cli.NewExitError("you must put sanic.yaml in a directory that contains a Dockerfile somewhere within it.", 1)
}

err = build.EnsureBuildkitDaemon()
if err != nil {
return cli.NewExitError(err.Error(), 1)
Expand Down

0 comments on commit 6301fab

Please sign in to comment.