Commit 709b309b authored by Sam Stephenson's avatar Sam Stephenson
Browse files

Automatically delete $TEMP_PATH if it's empty

parent 63bcf2c9
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@ build_failed() {
  { echo
    echo "BUILD FAILED"
    echo

    if ! rmdir "${TEMP_PATH}" 2>/dev/null; then
      echo "Inspect or clean up the working tree at ${TEMP_PATH}"

      if file_is_not_empty "$LOG_PATH"; then
@@ -35,6 +37,7 @@ build_failed() {
        echo "Last 10 log lines:"
        tail -n 10 "$LOG_PATH"
      fi
    fi
  } >&3
  exit 1
}