From 0aac3f59864a9443f5a97ea369bc18d8ee9bdb77 Mon Sep 17 00:00:00 2001 From: Theo Cranmore Date: Sat, 11 Feb 2023 19:17:52 +0000 Subject: [PATCH] possible fix for SUCCEED sometimes making the script fail --- entrypoint.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index 9a8b02b..c1e9d42 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -47,6 +47,9 @@ get_status () { local status; status=$(aws amplify list-jobs --app-id "$1" --branch-name "$2" | jq -r ".jobSummaries[] | select(.commitId == \"$3\") | .status") exit_status=$? + # it seems like sometimes status ends up with a new line in it? + # strip it out + status=$(echo $status | tr '\n' ' ') echo "$status" return $exit_status }