Skip to content

Commit

Permalink
Attempting to fix script exiting with wrong error code
Browse files Browse the repository at this point in the history
  • Loading branch information
hg-jarlinghaus committed Oct 28, 2020
1 parent 1931ead commit b8e2ca9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function runCdk(){
echo "${output}"

commentStatus="Failed"
if [ "${exitCode}" == "0" -o "${exitCode}" == "1" ]; then
if [ "${exitCode}" == "0" ]; then
commentStatus="Success"
fi

Expand All @@ -89,7 +89,9 @@ ${output}

echo "${payload}" | curl -s -S -H "Authorization: token ${GITHUB_TOKEN}" --header "Content-Type: application/json" --data @- "${commentsURL}" > /dev/null
fi
exit $exitCode
if [$exitCode == "1"]
exit 1
fi
}

function main(){
Expand Down

0 comments on commit b8e2ca9

Please sign in to comment.