File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ function modifyTaskDefinitionFile() {
154154 fi
155155 done
156156
157- if jq < " $TASK_DEFINITION_FILE " & > /dev/null; then
157+ if ! jq -e . < " $TASK_DEFINITION_FILE " > /dev/null 2>&1 ; then
158158 echo -e " ${RED} Task Definition became invalid JSON after modifications (invalid_task_definition)."
159159
160160 if [ -n " $RUNNER_DEBUG " ]; then
@@ -203,7 +203,7 @@ if [ -n "$INPUT_PREPARE_TASK_CONTAINER_IMAGE_CHANGES" ] && [ -n "$INPUT_PREPARE_
203203 modifyTaskDefinitionFile " $INPUT_PREPARE_TASK_DEFINITION_NAME " " $INPUT_PREPARE_TASK_CONTAINER_IMAGE_CHANGES "
204204
205205 if [ -n " $INPUT_PREPARE_TASK_CONTAINER_NETWORK_CONFIG_FILEPATH " ]; then
206- if jq < " $INPUT_PREPARE_TASK_CONTAINER_NETWORK_CONFIG_FILEPATH " & > /dev/null; then
206+ if ! jq -e . < " $INPUT_PREPARE_TASK_CONTAINER_NETWORK_CONFIG_FILEPATH " > /dev/null 2>&1 ; then
207207 echo -e " ${RED} Network configuration is invalid JSON. (invalid_network_config_file)."
208208 exit 1;
209209 fi
You can’t perform that action at this time.
0 commit comments