diff --git a/html/includes/output/db-update.inc.php b/html/includes/output/db-update.inc.php index f293b2cd44..4435a5d3e8 100644 --- a/html/includes/output/db-update.inc.php +++ b/html/includes/output/db-update.inc.php @@ -57,12 +57,15 @@ $db_vars = array( ]); -\Artisan::call('migrate', ['--seed' => true, '--force' => true , '--database' => 'setup']); -$fp = \Artisan::output(); echo "Starting Update...\n"; +try { + $ret = \Artisan::call('migrate', ['--seed' => true, '--force' => true, '--database' => 'setup']); -if ($fp) { - echo $fp; + echo \Artisan::output(); + + echo $ret == 0 ? "\n\nSuccess!" : "\n\nError!"; +} catch (Exception $e) { + echo $e->getMessage() . "\n\nError!"; } ob_end_flush(); diff --git a/html/install.php b/html/install.php index 7b94a0a3c6..f381c18c12 100644 --- a/html/install.php +++ b/html/install.php @@ -318,6 +318,10 @@ echo ""; xhr.onprogress = function (e) { output.innerHTML = e.currentTarget.responseText; output.scrollTop = output.scrollHeight - output.clientHeight; // scrolls the output area + if (output.innerHTML.indexOf('Error!') !== -1) { + // if error word in output, show the retry button + $("#retry-btn").css("display", ""); + } }; xhr.timeout = 90000; // if no response for 90s, allow the user to retry xhr.ontimeout = function (e) {