devcontainers / devcontainers/spec
Colons in default values for environment variables
- Vorherrschende Sprache
- Keine Sprachdaten
- Sterne
- 5.7k
- Forks
- 496
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
#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/`.
Beitragsleitfaden
Rechercherichtung
Überprüfe die Regeln der Spezifikation zur Interpolation von Umgebungsvariablen, mit Schwerpunkt auf dem Beispiel `${localEnv:API_URL:https://api.modrinth.com/v2/}` und dem Bash-Vergleich im Issue. Erledigt ist die Aufgabe, wenn die Spezifikation eindeutig Doppelpunkte bewahrt, die nach dem Trennzeichen für den Standardwert auftreten, und das Beispiel zur vollständigen URL ausgewertet wird; Implementierungsdateien oder Tests werden nicht genannt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Bereich
- documentation
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100