Commit c0482fd
committed
cli/command/system/newClientVersion: initialize with default API version
Set the APIVersion and DefaultAPIVersion fields to the default version,
as that's the version the client assumes without making a API connection
to do version negotiation.
One change worth mentioning is that this means that the API version will
differ, depending on the format:
If no server information is fetched:
docker info --format='{{ json .ClientInfo }}' | jq .ApiVersion
"1.44"
If server information is fetched:
docker info --format='{{ json .}}' | jq .ClientInfo.ApiVersion
"1.43"
An alternative could be to leave the ApiVersion field empty if no
negotiation took place.
Signed-off-by: Sebastiaan van Stijn <[email protected]>1 parent 0563fa6 commit c0482fd
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
0 commit comments