Also check the output of git before saying there is modified files

Indent files to improve readability
This commit is contained in:
Tony Murray
2016-07-14 15:25:14 -05:00
parent c88706531b
commit aa23223f71

View File

@@ -93,9 +93,9 @@ if($username === 'root') {
$modifiedcmd = 'su '.$config['user'].' -c "'.$modifiedcmd.'"';
}
exec($modifiedcmd, $cmdoutput, $code);
if($code !== 0) {
if($code !== 0 && !empty($cmdoutput)) {
print_warn("Your local git contains modified files, this could prevent automatic updates.\nModified files:");
echo(implode("\n", $cmdoutput) . "\n");
echo(' ' . implode("\n ", $cmdoutput) . "\n");
}
echo "DB Schema: ".$versions['db_schema']."\n";