diff --git a/entrypoint.sh b/entrypoint.sh index d1ef21a..5a2e705 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -62,10 +62,12 @@ function installPipRequirements(){ function runCdk(){ echo "Run cdk ${INPUT_CDK_SUBCOMMAND} ${*} \"${INPUT_CDK_STACK}\"" - output=$(cdk ${INPUT_CDK_SUBCOMMAND} ${*} "${INPUT_CDK_STACK}" 2>&1) + set -o pipefail + cdk ${INPUT_CDK_SUBCOMMAND} ${*} "${INPUT_CDK_STACK}" 2>&1 | tee output.log exitCode=${?} + set +o pipefail echo ::set-output name=status_code::${exitCode} - echo "${output}" + output=$(cat output.log) commentStatus="Failed" if [ "${exitCode}" == "0" ]; then