mirror of
https://github.com/docker/cli.git
synced 2025-08-29 00:47:54 +03:00
Disable docker system dial-stdio
on Windows
The `conn` here is `*winio.win32MessageBytePipe` which does not have a `CloseRead` method (it does have `CloseWrite`) resulting in: docker@WIN-NUC0 C:\Users\docker>.\docker-windows-amd64.exe system dial-stdio the raw stream connection does not implement halfCloser Also disable the path which uses this for cli-plugins on Windows. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
"sync"
|
||||
|
||||
"github.com/docker/cli/cli"
|
||||
@@ -74,7 +75,11 @@ func PersistentPreRunE(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
// flags must be the original top-level command flags, not cmd.Flags()
|
||||
options.opts.Common.SetDefaultOptions(options.flags)
|
||||
err = options.dockerCli.Initialize(options.opts, withPluginClientConn(options.name))
|
||||
var initopts []command.InitializeOpt
|
||||
if runtime.GOOS != "windows" {
|
||||
initopts = append(initopts, withPluginClientConn(options.name))
|
||||
}
|
||||
err = options.dockerCli.Initialize(options.opts, initopts...)
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user