MDL-31832 CLI upgrade will return 0 exit status if no upgrade is needed

Discussed with David, both points were valid but finally
we agreed about to consider the "no upgrade needed" exit
a normal/succesful one, mainly because it keeps previous
behavior the same (exit non-zero only for real errors).
This commit is contained in:
Eloy Lafuente (stronk7)
2012-03-07 11:02:47 +01:00
parent 1acc431b98
commit 4d4e00682b
+1 -1
View File
@@ -93,7 +93,7 @@ $oldversion = "$CFG->release ($CFG->version)";
$newversion = "$release ($version)";
if (!moodle_needs_upgrading()) {
cli_error(get_string('cliupgradenoneed', 'core_admin', $newversion), 63);
cli_error(get_string('cliupgradenoneed', 'core_admin', $newversion), 0);
}
// Test environment first.