Skip to content

Commit

Permalink
ci-wrapper: prevent piping from disabling automatic colors
Browse files Browse the repository at this point in the history
Replace PR coq#18337
  • Loading branch information
SkySkimmer committed Nov 20, 2023
1 parent 2f3e6c2 commit d71ff05
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dev/ci/ci-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "${DIR}/../.." || exit 1

export TIMED=1
bash "${DIR}/${CI_SCRIPT}" 2>&1 | tee time-of-build.log
if [ -t 1 ] && command -v script > /dev/null; then
# prevent piping from disabling auto colors
script --quiet --flush --return -c "bash '${DIR}/${CI_SCRIPT}'" /dev/null 2>&1 | tee time-of-build.log
else
bash "${DIR}/${CI_SCRIPT}" 2>&1 | tee time-of-build.log
fi
code=$?
echo 'Aggregating timing log...'
python ./tools/make-one-time-file.py time-of-build.log
Expand Down

0 comments on commit d71ff05

Please sign in to comment.