Skip to content

keep empty variables in service.environment list - #765

Merged
ndeloof merged 1 commit into
compose-spec:mainfrom
glours:fix-removal-empty-env-var
Apr 8, 2025
Merged

ndeloof merged 1 commit into
compose-spec:mainfrom
glours:fix-removal-empty-env-var

Conversation

@glours

@glours glours commented Apr 3, 2025

Copy link
Copy Markdown
Collaborator

those variables could be used to unset variables in the container

The issue was detected by Docker Compose CI
https://github.com/docker/compose/actions/runs/14223750088/job/39858067378?pr=12692

=== Failed
=== FAIL: pkg/e2e TestUnsetEnv/unset_env_variable (0.71s)
    compose_environment_test.go:241: Running command: docker compose -f ./fixtures/environment/empty-variable/compose.yaml run --rm empty-variable
    compose_environment_test.go:243: assertion failed: 
        Command:  docker compose -f ./fixtures/environment/empty-variable/compose.yaml run --rm empty-variable
        ExitCode: 0
        Stdout:   =not_empty=
        
        Stderr:   
        
        Failures:
        Expected stdout to contain "=="
    --- FAIL: TestUnsetEnv/unset_env_variable (0.71s)

those variables could be used to unset variables in the container

Signed-off-by: Guillaume Lours <[email protected]>
@glours
glours requested a review from ndeloof as a code owner April 3, 2025 08:32
@glours glours self-assigned this Apr 3, 2025
@ndeloof
ndeloof merged commit 7058bce into compose-spec:main Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants