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 <zebrilee@gmail.com>

revert change on docker.go, set HasExperimental to true in cli.go

Signed-off-by: zebrilee <zebrilee@gmail.com>
This commit is contained in:
zebrilee 2017-06-14 22:25:24 +02:00
parent 3be666387a
commit cca30cb1d9
1 changed files with 3 additions and 0 deletions

View File

@ -202,6 +202,9 @@ func (cli *DockerCli) Initialize(opts *cliflags.ClientOptions) error {
if versions.LessThan(ping.APIVersion, cli.client.ClientVersion()) { if versions.LessThan(ping.APIVersion, cli.client.ClientVersion()) {
cli.client.UpdateClientVersion(ping.APIVersion) cli.client.UpdateClientVersion(ping.APIVersion)
} }
} else {
// Default to true if we fail to connect to daemon
cli.server = ServerInfo{HasExperimental: true}
} }
return nil return nil