1
0
mirror of https://github.com/docker/cli.git synced 2026-01-18 08:21:31 +03: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>
Upstream-commit: 20ded0afd9
Component: cli
This commit is contained in:
Zhang Wei
2016-11-21 17:31:46 +08:00
parent d5535f5557
commit cf98c0f30e

View File

@@ -122,7 +122,7 @@ func NewEnvClient() (*Client, error) {
if err != nil {
return cli, err
}
if version != "" {
if os.Getenv("DOCKER_API_VERSION") != "" {
cli.manualOverride = true
}
return cli, nil