Commit 709b309b by Sam Stephenson

Automatically delete $TEMP_PATH if it's empty

parent 63bcf2c9
...@@ -27,6 +27,8 @@ build_failed() { ...@@ -27,6 +27,8 @@ build_failed() {
{ echo { echo
echo "BUILD FAILED" echo "BUILD FAILED"
echo echo
if ! rmdir "${TEMP_PATH}" 2>/dev/null; then
echo "Inspect or clean up the working tree at ${TEMP_PATH}" echo "Inspect or clean up the working tree at ${TEMP_PATH}"
if file_is_not_empty "$LOG_PATH"; then if file_is_not_empty "$LOG_PATH"; then
...@@ -35,6 +37,7 @@ build_failed() { ...@@ -35,6 +37,7 @@ build_failed() {
echo "Last 10 log lines:" echo "Last 10 log lines:"
tail -n 10 "$LOG_PATH" tail -n 10 "$LOG_PATH"
fi fi
fi
} >&3 } >&3
exit 1 exit 1
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment