mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Bugfix: set cli.manualOverride when env var not empty
If env var "DOCKER_API_VERSION" is specified by user, we'll set `cli.manualOverride`, before this, this field is always true due to wrong logic. Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
This commit is contained in:
parent
baa14c0e61
commit
4d54d30477
1 changed files with 1 additions and 1 deletions
|
@ -122,7 +122,7 @@ func NewEnvClient() (*Client, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return cli, err
|
return cli, err
|
||||||
}
|
}
|
||||||
if version != "" {
|
if os.Getenv("DOCKER_API_VERSION") != "" {
|
||||||
cli.manualOverride = true
|
cli.manualOverride = true
|
||||||
}
|
}
|
||||||
return cli, nil
|
return cli, nil
|
||||||
|
|
Loading…
Reference in a new issue