Skip to content

Commit a3a955f

Browse files
committed
Add docker engine commands only on Linux…
… this is, for now, the only platform that is supported Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 11ef349 commit a3a955f

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

cli/command/commands/commands.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package commands
22

33
import (
44
"os"
5+
"runtime"
56

67
"github.com/docker/cli/cli/command"
78
"github.com/docker/cli/cli/command/builder"
@@ -85,9 +86,6 @@ func AddCommands(cmd *cobra.Command, dockerCli command.Cli) {
8586
// volume
8687
volume.NewVolumeCommand(dockerCli),
8788

88-
// engine
89-
engine.NewEngineCommand(dockerCli),
90-
9189
// legacy commands may be hidden
9290
hide(system.NewEventsCommand(dockerCli)),
9391
hide(system.NewInfoCommand(dockerCli)),
@@ -124,7 +122,10 @@ func AddCommands(cmd *cobra.Command, dockerCli command.Cli) {
124122
hide(image.NewSaveCommand(dockerCli)),
125123
hide(image.NewTagCommand(dockerCli)),
126124
)
127-
125+
if runtime.GOOS == "linux" {
126+
// engine
127+
cmd.AddCommand(engine.NewEngineCommand(dockerCli))
128+
}
128129
}
129130

130131
func hide(cmd *cobra.Command) *cobra.Command {

0 commit comments

Comments
 (0)