armbian-next: logs: avoid errors by cwd'ing to SRC

This commit is contained in:
Ricardo Pardini
2022-07-07 17:49:49 +02:00
parent 379b7d6f19
commit 2196e957f0

View File

@@ -378,6 +378,9 @@ function export_html_logs() {
function trap_handler_cleanup_logging() {
[[ ! -d "${LOGDIR}" ]] && return 0
# `pwd` might not even be valid anymore. Move back to ${SRC}
cd "${SRC}" || exit_with_error "cray-cray about SRC: ${SRC}"
# Just delete LOGDIR if in CONFIG_DEFS_ONLY mode.
if [[ "${CONFIG_DEFS_ONLY}" == "yes" ]]; then
display_alert "Discarding logs" "CONFIG_DEFS_ONLY=${CONFIG_DEFS_ONLY}" "debug"