From 2a46a3d46cdf51a76037ee1089c3f4960851521e Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Tue, 11 Sep 2018 15:23:22 +0200 Subject: [PATCH] =?UTF-8?q?Add=20`docker=20engine`=20commands=20only=20on?= =?UTF-8?q?=20Linux=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … this is, for now, the only platform that is supported Signed-off-by: Vincent Demeester (cherry picked from commit a3a955f20453c5013f47e89132c794e8aee6ec0d) Signed-off-by: Sebastiaan van Stijn --- cli/command/commands/commands.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cli/command/commands/commands.go b/cli/command/commands/commands.go index cab61ddef7..ca2f6ad096 100644 --- a/cli/command/commands/commands.go +++ b/cli/command/commands/commands.go @@ -2,6 +2,7 @@ package commands import ( "os" + "runtime" "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command/builder" @@ -85,9 +86,6 @@ func AddCommands(cmd *cobra.Command, dockerCli command.Cli) { // volume volume.NewVolumeCommand(dockerCli), - // engine - engine.NewEngineCommand(dockerCli), - // legacy commands may be hidden hide(system.NewEventsCommand(dockerCli)), hide(system.NewInfoCommand(dockerCli)), @@ -124,7 +122,10 @@ func AddCommands(cmd *cobra.Command, dockerCli command.Cli) { hide(image.NewSaveCommand(dockerCli)), hide(image.NewTagCommand(dockerCli)), ) - + if runtime.GOOS == "linux" { + // engine + cmd.AddCommand(engine.NewEngineCommand(dockerCli)) + } } func hide(cmd *cobra.Command) *cobra.Command {