Skip to content

Commit 7058bce

Browse files
gloursndeloof
authored andcommitted
keep empty variables in service.environment list
those variables could be used to unset variables in the container Signed-off-by: Guillaume Lours <[email protected]>
1 parent 53f73f4 commit 7058bce

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

loader/loader_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,7 @@ services:
597597
"GA": strPtr("2.5"),
598598
"BU": strPtr(""),
599599
"MEU": strPtr("Shadoks"),
600+
"ZO": nil,
600601
}
601602

602603
assert.Check(t, is.Equal(2, len(config.Services)))

types/project.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ func (p *Project) MarshalJSON(options ...func(*marshallOptions)) ([]byte, error)
639639
func (p Project) WithServicesEnvironmentResolved(discardEnvFiles bool) (*Project, error) {
640640
newProject := p.deepCopy()
641641
for i, service := range newProject.Services {
642-
service.Environment = service.Environment.Resolve(newProject.Environment.Resolve).RemoveEmpty()
642+
service.Environment = service.Environment.Resolve(newProject.Environment.Resolve)
643643

644644
environment := service.Environment.ToMapping()
645645
for _, envFile := range service.EnvFiles {

0 commit comments

Comments
 (0)