add version negotiation to diagnostics docker client

This commit is contained in:
Jakob 2020-10-17 21:42:23 +02:00 committed by GitHub
parent e185f597ba
commit b19fc88a95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -187,7 +187,7 @@ func diagnosticsCmdRun(cmd *cobra.Command, args []string) {
} }
func getDockerInfo() (types.Version, types.Info, error) { func getDockerInfo() (types.Version, types.Info, error) {
cli, err := client.NewClientWithOpts(client.FromEnv) cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())
if err != nil { if err != nil {
return types.Version{}, types.Info{}, err return types.Version{}, types.Info{}, err
} }