-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(config): Replace environment variables if existing but empty #13570
Conversation
Is there a reason not to replace also non-existing vars with an empty string? |
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
I can't think of a use-case that would expect a value to be "foo" if |
Depends on compose-spec/compose-go#431. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to land once unit tests pass
) (cherry picked from commit 1dd45b1)
resolves #13565
Previous attempts (e.g. PR #13457) to restore the pre-1.27.0 environment-variable-replacement behavior missed one corner case where the environment variable exists but is empty. Versions before v1.27.0 will replace those variables (with an empty string) but the current code does not (see #13565).
This PR restores the old behavior by using the additional information about the application of the default replacement, indicating if an interpolation happened or if the variable could be mapped.