File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -138,10 +138,13 @@ function modifyTaskDefinitionFile() {
138138 exit 1;
139139 fi
140140
141- touch tmpfile;
141+ # Intentional skip when NO_IMAGE received to keep above error checking for empty image string
142+ if [[ " $IMAGE " != " NO_IMAGE" ]]; then
143+ touch tmpfile;
142144
143- # shellcheck disable=SC2002
144- cat " $TASK_DEFINITION_FILE " | jq --arg image " $IMAGE " --arg container " $CONTAINER " ' (.containerDefinitions[]? | select(.name==$container)) |= (.image=$image)' > tmpfile && mv tmpfile " $TASK_DEFINITION_FILE "
145+ # shellcheck disable=SC2002
146+ cat " $TASK_DEFINITION_FILE " | jq --arg image " $IMAGE " --arg container " $CONTAINER " ' (.containerDefinitions[]? | select(.name==$container)) |= (.image=$image)' > tmpfile && mv tmpfile " $TASK_DEFINITION_FILE "
147+ fi
145148 done
146149
147150 if jq < " $TASK_DEFINITION_FILE " & > /dev/null; then
You can’t perform that action at this time.
0 commit comments