mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Fix: exit code when upgrade is ran from command line
This commit is contained in:
@@ -351,10 +351,14 @@ if (empty($actiondone))
|
||||
print '<div class="error">'.$langs->trans("ErrorWrongParameters").'</div>';
|
||||
}
|
||||
|
||||
$ret=0;
|
||||
if (! $ok && isset($argv[1])) $ret=1;
|
||||
dol_syslog("Exit ".$ret);
|
||||
|
||||
pFooter(! $ok && empty($_GET["ignoreerrors"]),$setuplang);
|
||||
|
||||
if ($db->connected) $db->close();
|
||||
|
||||
// Return code if ran from command line
|
||||
if (! $ok && isset($argv[1])) exit(1);
|
||||
if ($ret) exit($ret);
|
||||
?>
|
||||
@@ -341,13 +341,16 @@ else
|
||||
$error++;
|
||||
}
|
||||
|
||||
$ret=0;
|
||||
if ($error && isset($argv[1])) $ret=1;
|
||||
dol_syslog("Exit ".$ret);
|
||||
|
||||
pFooter($error,$setuplang);
|
||||
|
||||
if ($db->connected) $db->close();
|
||||
|
||||
// Return code if ran from command line
|
||||
if ($error && isset($argv[1])) exit(1);
|
||||
if ($ret) exit($ret);
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user