Skip to content

Commit e019e3a

Browse files
committed
#32 Use tee to be able to view the command output while it's running
1 parent 2513304 commit e019e3a

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)