add newlines when exiting because of error

This commit is contained in:
ronivay
2020-05-31 00:22:19 +03:00
parent 188bbf1de1
commit c1042e8950

View File

@@ -82,9 +82,11 @@ function cmdlog {
function ErrorHandling {
echo
echo -e "${FAIL} Something went wrong, exiting. Check $LOGFILE for more details and use rollback feature if needed"
if [[ -d $INSTALLDIR/xo-builds/xen-orchestra-$TIME ]]; then
echo
echo -e "${FAIL} Removing $INSTALLDIR/xo-builds/xen-orchestra-$TIME because of failed installation."
cmdlog "rm -rf $INSTALLDIR/xo-builds/xen-orchestra-$TIME"
rm -rf $INSTALLDIR/xo-builds/xen-orchestra-$TIME >> $LOGFILE 2>&1