Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Hyphen isn't escaped in compose v2 env variables (block sequence entries are not allowed in this context) #1919

@quentincaffeino

Description

@quentincaffeino

.env:

SOME_VARIABLE="-"

docker-compose.yaml:

services:
  svc:
    environment:
      OTHER_VARIABLE: ${SOME_VARIABLE}

Gives an error: yaml: line 4: block sequence entries are not allowed in this context

Of course solution would be to wrap ${SOME_VARIABLE} in quotes but this used to work with previous composer so not sure if this is an issue. If not at least it might help someone searching for same problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions