Check if .git dir exists before accessing it
This commit is contained in:
parent
03285d6011
commit
50811fb256
1 changed files with 6 additions and 2 deletions
|
@ -851,7 +851,11 @@ function decodeAlias($logLine) {
|
|||
|
||||
|
||||
function getGitVersion(){
|
||||
if (file_exists(".git")) {
|
||||
exec("git rev-parse HEAD", $output);
|
||||
return 'GitID #<a href="https://github.com/dg9vh/MMDVMHost-Dashboard/commit/'.substr($output[0],0,7).'">'.substr($output[0],0,7).'</a>';
|
||||
} else {
|
||||
return 'GitID unknown';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue