mirror of https://github.com/docker/buildx.git
bake: read original command name from the env for prompt
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
203fd8aee5
commit
5ecff53e0c
|
@ -6,7 +6,6 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"strings"
|
||||
|
||||
|
@ -143,8 +142,8 @@ func (c EntitlementConf) Prompt(ctx context.Context, out io.Writer) error {
|
|||
}
|
||||
|
||||
args := append([]string(nil), os.Args...)
|
||||
if filepath.Base(args[0]) == "docker-buildx" {
|
||||
args[0] = "docker"
|
||||
if v, ok := os.LookupEnv("DOCKER_CLI_PLUGIN_ORIGINAL_CLI_COMMAND"); ok && v != "" {
|
||||
args[0] = v
|
||||
}
|
||||
idx := slices.Index(args, "bake")
|
||||
|
||||
|
|
Loading…
Reference in New Issue