docker-archive / compose-cli

Easily run your Compose application to the cloud with compose-cli
Apache License 2.0
957 stars 254 forks source link

Empty string in env var for `command` not accepted in v2.0.0-rc.1, was always fine before #2013

Closed rfay closed 3 years ago

rfay commented 3 years ago

Description

ddev uses a command: key, which based on variable replacement may be an empty string.

With docker-compose v1.0.0-rc1, use this docker-compose.yaml and docker-compose config

services:
  busybox:
    image: busybox
    command: "$COMMAND"
docker-compose enable-v2
rfay@rfay-tag1-m1:~/tmp/command$ COMMAND="" docker-compose config
services.busybox.command must be a string

This worked fine in compose v1 and also worked fine in all the previous v2 betas.

Describe the results you expected:

I expected this:

$ COMMAND="" docker-compose config
services:
  busybox:
    command: ''
    image: busybox
version: '3.9'

Output of docker-compose --version:

v2.0.0-rc.1

This is macOS, Docker Desktop 3.6.0. I'm sure it's the same everywhere.

mat007 commented 3 years ago

Thanks for the report, we’ll look into this. Internally tracked as https://docker.atlassian.net/browse/IL-505