newDialStdioCommand creates a new cobra.Command for `docker system dial-stdio`
(dockerCLI command.Cli)
| 15 | |
| 16 | // newDialStdioCommand creates a new cobra.Command for `docker system dial-stdio` |
| 17 | func newDialStdioCommand(dockerCLI command.Cli) *cobra.Command { |
| 18 | cmd := &cobra.Command{ |
| 19 | Use: "dial-stdio", |
| 20 | Short: "Proxy the stdio stream to the daemon connection. Should not be invoked manually.", |
| 21 | Args: cli.NoArgs, |
| 22 | Hidden: true, |
| 23 | RunE: func(cmd *cobra.Command, args []string) error { |
| 24 | return runDialStdio(cmd.Context(), dockerCLI) |
| 25 | }, |
| 26 | ValidArgsFunction: cobra.NoFileCompletions, |
| 27 | DisableFlagsInUseLine: true, |
| 28 | } |
| 29 | return cmd |
| 30 | } |
| 31 | |
| 32 | func runDialStdio(ctx context.Context, dockerCli command.Cli) error { |
| 33 | ctx, cancel := context.WithCancel(ctx) |
no test coverage detected
searching dependent graphs…