DockerCLI/cli
Sebastiaan van Stijn ec3daea021
Fix substitution with non-empty env-var
Due to a typo, substitution would not work if the given
environment-variable was set.

Given the following docker compose file;

```yaml
version: "3.7"

services:
  app:
    image: nginx:${version:-latest}
```

Deploying a stack with `$version` set would ignore the `$version`
environment variable, and use the default value instead;

```bash
version=alpine docker stack deploy -c docker-compose.yml foobar

Creating network foobar_default
Creating service foobar_app

docker service ls

ID                  NAME                MODE                REPLICAS            IMAGE               PORTS
rskkjxe6sm0w        foobar_app          replicated          1/1                 nginx:latest
```

This patch also fixes "soft default" not detecting empty environment variables,
only non-set environment variables.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-09-25 22:20:25 +02:00
..
command refactor stack list command unit tests to table-driven 2018-09-19 22:13:03 -04:00
compose Fix substitution with non-empty env-var 2018-09-25 22:20:25 +02:00
config cli/config/configfile: Atomically rewrite the config file when saving. 2018-09-10 13:43:24 -07:00
connhelper connhelper: fix cmd.Wait() race 2018-09-06 01:28:50 +09:00
debug updated vendoring 2017-09-01 19:41:06 -04:00
flags support SSH connection 2018-08-02 13:10:06 +09:00
manifest Fix manifest lists to always use correct size 2018-06-28 18:17:38 -07:00
registry/client fix insecure manifest inspect with restrictive certs perms 2018-09-20 10:51:29 -05:00
trust Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
winresources Add windows resources to binary. 2017-05-15 18:03:03 -04:00
cobra.go Merge pull request #1098 from dhiltgen/long_help 2018-08-30 18:07:10 +02:00
error.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00
required.go Singularize / pluralize "argument(s)" in error message 2017-08-12 18:25:38 +02:00
required_test.go Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
version.go Fix grammar typo in comment 2018-02-28 11:29:40 -05:00