function BenchmarkCommand::getGitHash
Return value
string
1 call to BenchmarkCommand::getGitHash()
- BenchmarkCommand::execute in webprofiler/
src/ Command/ BenchmarkCommand.php
File
-
webprofiler/
src/ Command/ BenchmarkCommand.php, line 228
Class
- BenchmarkCommand
- Class BenchmarkCommand
Namespace
Drupal\webprofiler\CommandCode
private function getGitHash() {
try {
$process = new Process('git rev-parse HEAD');
$process->setTimeout(3600);
$process->run();
$git_hash = $process->getOutput();
} catch (\Exception $e) {
$git_hash = $this->trans('commands.webprofiler.benchmark.messages.not_git');
}
return $git_hash;
}