Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashes in variable names <=> environment: block #663

Closed
simonhammes opened this issue Jul 19, 2024 · 3 comments · Fixed by #680
Closed

Dashes in variable names <=> environment: block #663

simonhammes opened this issue Jul 19, 2024 · 3 comments · Fixed by #680

Comments

@simonhammes
Copy link

simonhammes commented Jul 19, 2024

Dashes can be used in variable names (#336).

However, I'm unable to use a variable that contains dashes in an environment: block since compose interprets the dash as a separator between the variable name and its default value:

environment:
  VAR-WITH-DASHES: ${VAR-WITH-DASHES}

Is there any way to escape the dash or is this a bug/unimplemented functionality?

@ndeloof
Copy link
Collaborator

ndeloof commented Sep 4, 2024

- indeed is delimiter for default value, which makes #336 actually irrelevant 😓
I guess we should revert, as this issue demonstrate this "feature" was incomplete and can't be used anyway
cc @jhrotko @glours

@KasonBraley
Copy link

KasonBraley commented Oct 8, 2024

@glours Can this bug fix be released in a patch so compose can release a version with the fix?

docker/compose#12123

@ndeloof
Copy link
Collaborator

ndeloof commented Oct 9, 2024

no worries, this will be part of the next compose release coming soon.
Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants