diff --git a/include/functions.php b/include/functions.php index bf905ca..6b363bb 100644 --- a/include/functions.php +++ b/include/functions.php @@ -851,7 +851,11 @@ function decodeAlias($logLine) { function getGitVersion(){ - exec("git rev-parse HEAD", $output); - return 'GitID #'.substr($output[0],0,7).''; + if (file_exists(".git")) { + exec("git rev-parse HEAD", $output); + return 'GitID #'.substr($output[0],0,7).''; + } else { + return 'GitID unknown'; + } } ?>