mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #3840 from murrant/fix-validate-empty-modified
Validate: Also check the output of git before saying there is modified files
This commit is contained in:
@ -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";
|
||||
|
Reference in New Issue
Block a user