devcontainers / devcontainers/spec

Colons in default values for environment variables

Open
#565 2 comments 4 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
5.7k
Forks
496
PR merge metrics
No merged PRs in 30d

Description

#63 argued about variable names that contained colons, and while that does seem like an unlikely use case, a variable's value that contains a colon is not that uncommon.

Example: `${localEnv:API_URL:https://api.modrinth.com/v2/}`

This will evaluate to `https`, whereas one would expect it'd evaluate to `https://api.modrinth.com/v2`, akin to `${API_URL:-https://api.modrinth.com/v2/}` in Bash.

Would be nice to have it in specification that any colon following the second colon will be preserved as is in the default value, rather than terminate the default value segment. That'd mean the above example would correctly evaluate to `https://api.modrinth.com/v2/`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.