mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
Merge pull request #2100 from dvdksn/bake-empty-definition
bake: improve error message for empty definition
This commit is contained in:
@ -152,6 +152,10 @@ func runBake(dockerCli command.Cli, targets []string, in bakeOptions, cFlags com
|
||||
return err
|
||||
}
|
||||
|
||||
if len(files) == 0 {
|
||||
return errors.New("couldn't find a bake definition")
|
||||
}
|
||||
|
||||
tgts, grps, err := bake.ReadTargets(ctx, files, targets, overrides, map[string]string{
|
||||
// don't forget to update documentation if you add a new
|
||||
// built-in variable: docs/bake-reference.md#built-in-variables
|
||||
|
Reference in New Issue
Block a user