GitHub
07/06/2026, 7:44 AM${VAR} regex pattern to optionally capture a :- or - default operator followed by a default value (e.g. ${VAR:-default} or ${VAR-default}).
• ${VAR:-default} returns the default if VAR is unset or empty.
• ${VAR-default} returns the default only if VAR is unset.
• Falls back to existing behavior (raising on missing variable) when no default is specified.
• Escaped variables (\$VAR) now return the original match with the escape character stripped, rather than a reconstructed string.
Checklist
• I have read the contribution guide
Was generative AI tooling used to co-author this PR?
• Yes (please specify the tool below)
Related Issues
• Closes #9970
Summary by Sourcery
Add support for Docker Compose–style default values in environment variable interpolation and verify behavior in strict env var mode.
New Features:
• Support ${VAR:-default} and ${VAR-default} syntax for environment variable interpolation with appropriate handling of unset and empty values.
Enhancements:
• Preserve escaped environment variable expressions by returning the original match without the escape character.
• Extend nested and array env var expansion to handle default values consistently.
Tests:
• Add unit tests covering default value interpolation semantics, escaping behavior, nested structures, arrays, and strict env var mode interactions.
meltano/meltanoGitHub
07/29/2026, 1:22 PM