Skip to content

Commit 4d7c69e

Browse files
committed
fix bug in updateService() where the addition of quotes breaks aws call
The correct code splits the jq list of running tasks on newlines and passes it as separate arguments to the aws cli. The broken code retains the newlines received from jq, which is interpreted incorrectly by the aws cli.
1 parent 2d34140 commit 4d7c69e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ecs-deploy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

33
# Setup default values for variables
4-
VERSION="3.10.24"
4+
VERSION="3.10.25"
55
CLUSTER=false
66
SERVICE=false
77
TASK_DEFINITION=false
@@ -486,7 +486,7 @@ function updateService() {
486486
| jq -r '.taskArns[]')
487487

488488
if [[ ! -z "$RUNNING_TASKS" ]] ; then
489-
RUNNING=$($AWS_ECS describe-tasks --cluster "$CLUSTER" --tasks "$RUNNING_TASKS" \
489+
RUNNING=$($AWS_ECS describe-tasks --cluster "$CLUSTER" --tasks $RUNNING_TASKS \
490490
| jq ".tasks[]| if .taskDefinitionArn == \"$NEW_TASKDEF\" then . else empty end|.${checkFieldName}" \
491491
| grep -e "${checkFieldValue}") || :
492492

0 commit comments

Comments
 (0)