Skip to content
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #40 from mrmeyers99/#32-see-job-progress
Browse files Browse the repository at this point in the history
#32 Use tee to be able to view the command output while it's running
  • Loading branch information
youyo authored Sep 27, 2021
2 parents 87cece7 + e019e3a commit 0d19eea
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 @@ -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
Expand Down

0 comments on commit 0d19eea

Please sign in to comment.