<#10140 feat(core): support default values in envi...
# meltano-repo-activity
g
#10140 feat(core): support default values in environment variable interpolation Pull request opened by AaronProbha18 Description Adds support for Docker Compose–style default values in environment variable interpolation: • Extends the
${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/meltano