mirror of https://github.com/docker/cli.git
Partially revert cf663b526a
as it breaks the version negotiation with an older docker engine.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
(cherry picked from commit 54f766d240
)
This commit is contained in:
parent
ab108430b2
commit
2d1476c6f0
|
@ -9,7 +9,6 @@ import (
|
|||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/docker/cli/cli/config"
|
||||
|
@ -140,12 +139,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
|
||||
}
|
||||
|
||||
|
@ -280,6 +276,7 @@ func (cli *DockerCli) Initialize(opts *cliflags.ClientOptions, ops ...Initialize
|
|||
return err
|
||||
}
|
||||
}
|
||||
cli.initializeFromClient()
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue