Skip to content

Commit 54f766d

Browse files
Partially revert cf663b5 as it breaks the version negotiation with an older docker engine.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
1 parent f729837 commit 54f766d

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

cli/command/cli.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"runtime"
1010
"strconv"
1111
"strings"
12-
"sync"
1312
"time"
1413

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

139-
var fetchServerInfo sync.Once
140-
141138
// ServerInfo returns the server version details for the host this client is
142139
// connected to
143140
func (cli *DockerCli) ServerInfo() ServerInfo {
144-
fetchServerInfo.Do(cli.initializeFromClient)
145141
return cli.serverInfo
146142
}
147143

@@ -276,6 +272,7 @@ func (cli *DockerCli) Initialize(opts *cliflags.ClientOptions, ops ...Initialize
276272
return err
277273
}
278274
}
275+
cli.initializeFromClient()
279276
return nil
280277
}
281278

0 commit comments

Comments
 (0)