1
0
Fork 0

GitDriver: use authentication for supports check

pull/8993/head
Stephan Vock 2020-06-19 10:24:40 +01:00
parent cb1f3899bb
commit 52332d994e
1 changed files with 11 additions and 2 deletions

View File

@ -219,8 +219,17 @@ class GitDriver extends VcsDriver
return false;
}
$process = new ProcessExecutor($io);
$gitUtil = new GitUtil($io, $config, new ProcessExecutor($io), new Filesystem());
GitUtil::cleanEnv();
return $process->execute('git ls-remote --heads ' . ProcessExecutor::escape($url), $output) === 0;
try {
$gitUtil->runCommand(function ($url) {
return 'git ls-remote --heads ' . ProcessExecutor::escape($url);
}, $url, sys_get_temp_dir());
} catch (\RuntimeException $e) {
return false;
}
return true;
}
}