From 191971ac9100e08868680e4ea91abdcc6f3ec298 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Sun, 12 May 2019 22:28:49 +0200 Subject: [PATCH] CommonInstaller: make error function not produce errors itself (sic\!) when error-ing before /data is mounted (read: ultra-early in install process --- CommonInstaller | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CommonInstaller b/CommonInstaller index 2572dbd..20a153f 100644 --- a/CommonInstaller +++ b/CommonInstaller @@ -213,12 +213,14 @@ error () { ui_print "${@}" ui_print " !!" - [ "${MODE}" = "MAGISK" ] && rm -rf "${MODPATH}" + if is_mounted /data; then + [ "${MODE}" = "MAGISK" ] && rm -rf "${MODPATH}" - recovery_cleanup + recovery_cleanup - INSTALL_SUCCESS=FALSE - nanodroid_storelogs + INSTALL_SUCCESS=FALSE + nanodroid_storelogs + fi exit 1 }