Auto merge of #95050 - ehuss:fix-cmake-build, r=Mark-Simulacrum
Fix cmake build. This is an attempt to fix the cmake build. For some reason, it has recently started failing with a permission denied trying to overwrite `/tmp/build.log`. This file exists from the `build-toolchains.sh` step, which is owned by the rustbuild user. I think there is some behavior where a sticky `/tmp` directory doesn't allow overwriting files owned by other users even when running as root. I do not know why this has suddenly started, and I can't reproduce locally with my own docker setup. However, this fix seems to work on CI.
This commit is contained in:
commit
58f11791af
1 changed files with 3 additions and 3 deletions
|
@ -5,16 +5,16 @@ hide_output() {
|
|||
set +x
|
||||
on_err="
|
||||
echo ERROR: An error was encountered with the build.
|
||||
cat /tmp/build.log
|
||||
cat /tmp/cmake_build.log
|
||||
exit 1
|
||||
"
|
||||
trap "$on_err" ERR
|
||||
bash -c "while true; do sleep 30; echo \$(date) - building ...; done" &
|
||||
PING_LOOP_PID=$!
|
||||
"$@" &> /tmp/build.log
|
||||
"$@" &> /tmp/cmake_build.log
|
||||
trap - ERR
|
||||
kill $PING_LOOP_PID
|
||||
rm /tmp/build.log
|
||||
rm /tmp/cmake_build.log
|
||||
set -x
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue