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"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
|
||||||
"slices"
|
"slices"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -143,8 +142,8 @@ func (c EntitlementConf) Prompt(ctx context.Context, out io.Writer) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
args := append([]string(nil), os.Args...)
|
args := append([]string(nil), os.Args...)
|
||||||
if filepath.Base(args[0]) == "docker-buildx" {
|
if v, ok := os.LookupEnv("DOCKER_CLI_PLUGIN_ORIGINAL_CLI_COMMAND"); ok && v != "" {
|
||||||
args[0] = "docker"
|
args[0] = v
|
||||||
}
|
}
|
||||||
idx := slices.Index(args, "bake")
|
idx := slices.Index(args, "bake")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue