Merge pull request #195 from Zebrilee/fix-issue-114

fix the issue `--help` doesn't work if daemon is not available
This commit is contained in:
Brian Goff 2017-06-20 16:38:36 -07:00 committed by GitHub
commit 760f847bc8
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()) {
cli.client.UpdateClientVersion(ping.APIVersion)
}
} else {
// Default to true if we fail to connect to daemon
cli.server = ServerInfo{HasExperimental: true}
}
return nil