Skip to content

Commit

Permalink
Partially revert cf663b5 as it breaks the version negotiation with an…
Browse files Browse the repository at this point in the history
… older docker engine.

Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
  • Loading branch information
silvin-lubecki committed May 20, 2020
1 parent f729837 commit 54f766d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cli/command/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"runtime"
"strconv"
"strings"
"sync"
"time"

"github.com/docker/cli/cli/config"
Expand Down Expand Up @@ -136,12 +135,9 @@ func (cli *DockerCli) loadConfigFile() {
cli.configFile = cliconfig.LoadDefaultConfigFile(cli.err)
}

var fetchServerInfo sync.Once

// ServerInfo returns the server version details for the host this client is
// connected to
func (cli *DockerCli) ServerInfo() ServerInfo {
fetchServerInfo.Do(cli.initializeFromClient)
return cli.serverInfo
}

Expand Down Expand Up @@ -276,6 +272,7 @@ func (cli *DockerCli) Initialize(opts *cliflags.ClientOptions, ops ...Initialize
return err
}
}
cli.initializeFromClient()
return nil
}

Expand Down

0 comments on commit 54f766d

Please sign in to comment.