Skip to content

Commit

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

This reverts commit 7b2fac4.

Signed-off-by: Tibor Vass <[email protected]>
  • Loading branch information
Tibor Vass committed May 19, 2020
1 parent f575a33 commit 2ea2f6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cli/command/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"runtime"
"strconv"
"strings"
"sync"
"time"

"github.com/docker/cli/cli/config"
Expand Down Expand Up @@ -139,9 +140,12 @@ 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,7 +280,6 @@ func (cli *DockerCli) Initialize(opts *cliflags.ClientOptions, ops ...Initialize
return err
}
}
cli.initializeFromClient()
return nil
}

Expand Down

0 comments on commit 2ea2f6c

Please sign in to comment.