Skip to content

Commit

Permalink
privileged is false if its not in the request
Browse files Browse the repository at this point in the history
  • Loading branch information
nzoschke committed Feb 9, 2016
1 parent 06b5b67 commit fe229e2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions api/cmd/formation/handler/ecs.go
Expand Up @@ -359,13 +359,17 @@ func ECSTaskDefinitionCreate(req Request) (string, map[string]string, error) {
memory, err := strconv.Atoi(task["Memory"].(string))

if err != nil {
return "error parsing memory value", nil, err
return "invalid", nil, err
}

privileged, err := strconv.ParseBool(task["Privileged"].(string))
privileged := false

if err != nil {
return "error parsing privileged value", nil, err
if p, ok := task["Privileged"].(string); ok && p != "" {
privileged, err = strconv.ParseBool(p)

if err != nil {
return "invalid", nil, err
}
}

r.ContainerDefinitions[i] = &ecs.ContainerDefinition{
Expand Down

0 comments on commit fe229e2

Please sign in to comment.