Fix Rancid GIT (#11795)

This commit is contained in:
dupondje
2020-06-09 16:01:44 +02:00
committed by GitHub
parent 28ee0f1823
commit 4611b19ae5
2 changed files with 16 additions and 2 deletions

View File

@@ -46,7 +46,7 @@ if (Auth::user()->hasGlobalAdmin()) {
if (Config::get('rancid_repo_type') == 'git') {
$sep = ' | ';
$process = new Process(array('git', 'log', '-n 8', '--pretty=format:%h;%ct', $rancid_file), $configs);
$process = new Process(array('git', 'log', '-n 8', '--pretty=format:%h;%ct', $rancid_file), $rancid_path);
$process->run();
$gitlogs_raw = explode(PHP_EOL, $process->getOutput());
$gitlogs = array();
@@ -100,7 +100,7 @@ if (Auth::user()->hasGlobalAdmin()) {
}
} elseif (Config::get('rancid_repo_type') == 'git') {
if (in_array($vars['rev'], $revlist)) {
$process = new Process(array('git', 'diff', $vars['rev'] . '^', $vars['rev'], $rancid_file), $configs);
$process = new Process(array('git', 'diff', $vars['rev'] . '^', $vars['rev'], $rancid_file), $rancid_path);
$process->run();
$diff = $process->getOutput();
if (!$diff) {