File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -138,10 +138,13 @@ function modifyTaskDefinitionFile() {
138
138
exit 1;
139
139
fi
140
140
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;
142
144
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
145
148
done
146
149
147
150
if jq < " $TASK_DEFINITION_FILE " & > /dev/null; then
You can’t perform that action at this time.
0 commit comments