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>
33 lines
651 B
Go
33 lines
651 B
Go
package system
|
|
|
|
import (
|
|
"runtime"
|
|
|
|
"github.com/docker/cli/cli"
|
|
"github.com/docker/cli/cli/command"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// NewSystemCommand returns a cobra command for `system` subcommands
|
|
func NewSystemCommand(dockerCli command.Cli) *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "system",
|
|
Short: "Manage Docker",
|
|
Args: cli.NoArgs,
|
|
RunE: command.ShowHelp(dockerCli.Err()),
|
|
}
|
|
cmd.AddCommand(
|
|
NewEventsCommand(dockerCli),
|
|
NewInfoCommand(dockerCli),
|
|
newDiskUsageCommand(dockerCli),
|
|
newPruneCommand(dockerCli),
|
|
)
|
|
if runtime.GOOS != "windows" {
|
|
cmd.AddCommand(
|
|
newDialStdioCommand(dockerCli),
|
|
)
|
|
}
|
|
|
|
return cmd
|
|
}
|