diff --git a/commands/build.go b/commands/build.go index f42186d2..7982ce32 100644 --- a/commands/build.go +++ b/commands/build.go @@ -628,7 +628,7 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions, debugConfig *debug.D cobrautil.MarkFlagsExperimental(flags, "root", "detach", "server-config") } - flags.StringVar(&options.printFunc, "call", "", `Set method for evaluating build ("check", "outline", "targets")`) + flags.StringVar(&options.printFunc, "call", "build", `Set method for evaluating build ("check", "outline", "targets")`) // hidden flags var ignore string diff --git a/docs/reference/buildx_build.md b/docs/reference/buildx_build.md index d3e3c253..6170fc3a 100644 --- a/docs/reference/buildx_build.md +++ b/docs/reference/buildx_build.md @@ -24,7 +24,7 @@ Start a build | [`--builder`](#builder) | `string` | | Override the configured builder instance | | [`--cache-from`](#cache-from) | `stringArray` | | External cache sources (e.g., `user/app:cache`, `type=local,src=path/to/dir`) | | [`--cache-to`](#cache-to) | `stringArray` | | Cache export destinations (e.g., `user/app:cache`, `type=local,dest=path/to/dir`) | -| `--call` | `string` | | Set method for evaluating build (`check`, `outline`, `targets`) | +| `--call` | `string` | `build` | Set method for evaluating build (`check`, `outline`, `targets`) | | [`--cgroup-parent`](https://docs.docker.com/reference/cli/docker/image/build/#cgroup-parent) | `string` | | Set the parent cgroup for the `RUN` instructions during build | | `--detach` | | | Detach buildx server (supported only on linux) (EXPERIMENTAL) | | [`-f`](https://docs.docker.com/reference/cli/docker/image/build/#file), [`--file`](https://docs.docker.com/reference/cli/docker/image/build/#file) | `string` | | Name of the Dockerfile (default: `PATH/Dockerfile`) | diff --git a/docs/reference/buildx_debug_build.md b/docs/reference/buildx_debug_build.md index 6a904a4b..af9e7606 100644 --- a/docs/reference/buildx_debug_build.md +++ b/docs/reference/buildx_debug_build.md @@ -20,7 +20,7 @@ Start a build | `--builder` | `string` | | Override the configured builder instance | | `--cache-from` | `stringArray` | | External cache sources (e.g., `user/app:cache`, `type=local,src=path/to/dir`) | | `--cache-to` | `stringArray` | | Cache export destinations (e.g., `user/app:cache`, `type=local,dest=path/to/dir`) | -| `--call` | `string` | | Set method for evaluating build (`check`, `outline`, `targets`) | +| `--call` | `string` | `build` | Set method for evaluating build (`check`, `outline`, `targets`) | | [`--cgroup-parent`](https://docs.docker.com/reference/cli/docker/image/build/#cgroup-parent) | `string` | | Set the parent cgroup for the `RUN` instructions during build | | `--detach` | | | Detach buildx server (supported only on linux) (EXPERIMENTAL) | | [`-f`](https://docs.docker.com/reference/cli/docker/image/build/#file), [`--file`](https://docs.docker.com/reference/cli/docker/image/build/#file) | `string` | | Name of the Dockerfile (default: `PATH/Dockerfile`) | diff --git a/util/buildflags/printfunc.go b/util/buildflags/printfunc.go index 070971c3..6a5a95c1 100644 --- a/util/buildflags/printfunc.go +++ b/util/buildflags/printfunc.go @@ -9,8 +9,10 @@ import ( "github.com/pkg/errors" ) +const defaultPrintFunc = "build" + func ParsePrintFunc(str string) (*controllerapi.PrintFunc, error) { - if str == "" { + if str == "" || str == defaultPrintFunc { return nil, nil }