Skip to content

Commit 6146a20

Browse files
authored
Fix for AWS BYOC empty WorkingDirectory (#729)
1 parent 9456a5c commit 6146a20

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/pkg/clouds/aws/ecs/cfn/template.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,12 +395,14 @@ func createTemplate(stack string, containers []types.Container, overrides Templa
395395
"awslogs-stream-prefix": awsecs.AwsLogsStreamPrefix,
396396
},
397397
},
398-
VolumesFrom: volumesFrom,
399-
MountPoints: mountPoints,
400-
EntryPoint: container.EntryPoint,
401-
Command: container.Command,
402-
WorkingDirectory: &container.WorkDir,
403-
DependsOnProp: dependsOn,
398+
VolumesFrom: volumesFrom,
399+
MountPoints: mountPoints,
400+
EntryPoint: container.EntryPoint,
401+
Command: container.Command,
402+
DependsOnProp: dependsOn,
403+
}
404+
if container.WorkDir != "" {
405+
def.WorkingDirectory = ptr.String(container.WorkDir)
404406
}
405407
containerDefinitions = append(containerDefinitions, def)
406408
}

0 commit comments

Comments
 (0)