зеркало из https://github.com/docker/compose-cli.git
mobycli: append .exe to com.docker.cli on windows
Signed-off-by: Nick Sieger <nick@nicksieger.com>
This commit is contained in:
Родитель
fc215287b5
Коммит
22d68602ae
|
@ -24,6 +24,7 @@ import (
|
|||
"os/signal"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"runtime"
|
||||
|
||||
"github.com/docker/compose/v2/pkg/compose"
|
||||
"github.com/docker/compose/v2/pkg/utils"
|
||||
|
@ -38,7 +39,13 @@ import (
|
|||
var delegatedContextTypes = []string{store.DefaultContextType}
|
||||
|
||||
// ComDockerCli name of the classic cli binary
|
||||
const ComDockerCli = "com.docker.cli"
|
||||
var ComDockerCli = "com.docker.cli"
|
||||
|
||||
func init() {
|
||||
if runtime.GOOS == "windows" {
|
||||
ComDockerCli += ".exe"
|
||||
}
|
||||
}
|
||||
|
||||
// ExecIfDefaultCtxType delegates to com.docker.cli if on moby context
|
||||
func ExecIfDefaultCtxType(ctx context.Context, root *cobra.Command) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче