Skip to content

Allow colons in default values for environment variables#1213

Open
cbguder wants to merge 1 commit intodevcontainers:mainfrom
cbguder:cbguder/allow-colon-in-localEnv-defaults
Open

Allow colons in default values for environment variables#1213
cbguder wants to merge 1 commit intodevcontainers:mainfrom
cbguder:cbguder/allow-colon-in-localEnv-defaults

Conversation

@cbguder
Copy link
Copy Markdown

@cbguder cbguder commented Apr 27, 2026

Anything after a third colon is silently ignored in variable substitution, which prevents using default values with colons in them (e.g. URLs or image:tag).

This limits the split at 3 parts by joining any additional parts back together.

A similar fix was previously proposed in #882 a couple years ago. Open to exploring different solutions (e.g. quoting the entire default value or escaping colons) if there is still a desire to retain the ability to introduce more than 2 arguments in variable substitution.

Fixes #719, #883.

Anything after a third colon is silently ignored in variable
substitution, which prevents using default values with colons in them
(e.g. URLs or image:tag).

This limits the split at 3 parts by joining any additional parts back
together.

A similar fix was previously proposed in devcontainers#882 a couple years ago. Open
to exploring different solutions (e.g. quoting the entire default value
or escaping colons) if there is still a desire to retain the ability to
introduce more than 2 arguments in variable substitution.

Fixes devcontainers#719, devcontainers#883.
@cbguder cbguder requested a review from a team as a code owner April 27, 2026 23:44
@cbguder
Copy link
Copy Markdown
Author

cbguder commented Apr 27, 2026

@microsoft-github-policy-service agree

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 this pull request may close these issues.

How to specify the default value with colon for localEnv.

1 participant