mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
commands: check if flag is set instead of using flagutil.Tristate
Fixes --pull and --no-cache without argument Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
@ -106,13 +106,15 @@ func bakeCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command {
|
||||
Use: "bake [OPTIONS] [TARGET...]",
|
||||
Aliases: []string{"f"},
|
||||
Short: "Build from a file",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return runBake(dockerCli, args, options)
|
||||
},
|
||||
}
|
||||
|
||||
flags := cmd.Flags()
|
||||
|
||||
cmd.RunE = func(cmd *cobra.Command, args []string) error {
|
||||
handleUnsetFlags(flags, &options)
|
||||
return runBake(dockerCli, args, options)
|
||||
}
|
||||
|
||||
flags.StringArrayVarP(&options.files, "file", "f", []string{}, "Build definition file")
|
||||
flags.BoolVar(&options.printOnly, "print", false, "Print the options without building")
|
||||
flags.StringArrayVar(&options.overrides, "set", nil, "Override target value (eg: targetpattern.key=value)")
|
||||
|
Reference in New Issue
Block a user