From 9fa6954b472d6ac0d11a6848d5aeac4d7362fc7d Mon Sep 17 00:00:00 2001 From: zebrilee Date: Wed, 14 Jun 2017 22:25:24 +0200 Subject: [PATCH] comment the return of setHelpFunc in order to show --help even if the daemon is not running. Then add a if statement in isSupported function to check if the daemon is running Signed-off-by: zebrilee revert change on docker.go, set HasExperimental to true in cli.go Signed-off-by: zebrilee Upstream-commit: cca30cb1d9d1a8b9facce27e92e0c331a41659b7 Component: cli --- components/cli/cli/command/cli.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/cli/cli/command/cli.go b/components/cli/cli/command/cli.go index 59efa9ac2a..a8529b512d 100644 --- a/components/cli/cli/command/cli.go +++ b/components/cli/cli/command/cli.go @@ -202,6 +202,9 @@ func (cli *DockerCli) Initialize(opts *cliflags.ClientOptions) error { if versions.LessThan(ping.APIVersion, cli.client.ClientVersion()) { cli.client.UpdateClientVersion(ping.APIVersion) } + } else { + // Default to true if we fail to connect to daemon + cli.server = ServerInfo{HasExperimental: true} } return nil