Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 962e636

Browse files
authored
Merge pull request #2558 from tiborvass/19.03-expenv-panic
[19.03] Fix bug with panic when DOCKER_CLI_EXPERIMENTAL environment variable is incorrect Upstream-commit: dd360c7c0de8d9132a3965db6a59d3ae74f43ba7 Component: cli
2 parents 9c610e0 + e002ed9 commit 962e636

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

  • components/cli/cli/command

components/cli/cli/command/cli.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,9 @@ func (cli *DockerCli) ServerInfo() ServerInfo {
148148
// ClientInfo returns the client details for the cli
149149
func (cli *DockerCli) ClientInfo() ClientInfo {
150150
if cli.clientInfo == nil {
151-
_ = cli.loadClientInfo()
151+
if err := cli.loadClientInfo(); err != nil {
152+
panic(err)
153+
}
152154
}
153155
return *cli.clientInfo
154156
}
@@ -277,6 +279,11 @@ func (cli *DockerCli) Initialize(opts *cliflags.ClientOptions, ops ...Initialize
277279
}
278280
}
279281
cli.initializeFromClient()
282+
283+
if err := cli.loadClientInfo(); err != nil {
284+
return err
285+
}
286+
280287
return nil
281288
}
282289

0 commit comments

Comments
 (0)