From 8671dae9b65f429706da59e98dd82ccc8b258c81 Mon Sep 17 00:00:00 2001 From: bonty Date: Thu, 7 Apr 2016 14:02:04 +0900 Subject: [PATCH] fix register task definition when WorkingDirectory is empty --- task/task.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/task/task.go b/task/task.go index aa01989..9012ea0 100644 --- a/task/task.go +++ b/task/task.go @@ -230,7 +230,6 @@ func createContainerDefinition(con *ContainerDefinition) (*ecs.ContainerDefiniti Privileged: aws.Bool(con.Privileged), ReadonlyRootFilesystem: aws.Bool(con.ReadonlyRootFilesystem), Ulimits: toUlimits(con.Ulimits), - WorkingDirectory: aws.String(con.WorkingDirectory), } if con.Hostname != "" { @@ -245,6 +244,9 @@ func createContainerDefinition(con *ContainerDefinition) (*ecs.ContainerDefiniti if con.User != "" { cd.User = aws.String(con.User) } + if con.WorkingDirectory != "" { + cd.WorkingDirectory = aws.String(con.WorkingDirectory) + } return cd, volumes, nil }