Skip to content

Commit 0d19eea

Browse files
authored
Merge pull request youyo#40 from mrmeyers99/#32-see-job-progress
#32 Use tee to be able to view the command output while it's running
2 parents 87cece7 + e019e3a commit 0d19eea

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

entrypoint.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,12 @@ function installPipRequirements(){
6262

6363
function runCdk(){
6464
echo "Run cdk ${INPUT_CDK_SUBCOMMAND} ${*} \"${INPUT_CDK_STACK}\""
65-
output=$(cdk ${INPUT_CDK_SUBCOMMAND} ${*} "${INPUT_CDK_STACK}" 2>&1)
65+
set -o pipefail
66+
cdk ${INPUT_CDK_SUBCOMMAND} ${*} "${INPUT_CDK_STACK}" 2>&1 | tee output.log
6667
exitCode=${?}
68+
set +o pipefail
6769
echo ::set-output name=status_code::${exitCode}
68-
echo "${output}"
70+
output=$(cat output.log)
6971

7072
commentStatus="Failed"
7173
if [ "${exitCode}" == "0" ]; then

0 commit comments

Comments
 (0)