Move check to follow the previous code change
parent
0c775e997e
commit
2eb69f120e
|
@ -53,12 +53,12 @@ class Git
|
||||||
}
|
}
|
||||||
|
|
||||||
$protocols = $this->config->get('github-protocols');
|
$protocols = $this->config->get('github-protocols');
|
||||||
|
if (!is_array($protocols)) {
|
||||||
|
throw new \RuntimeException('Config value "github-protocols" must be an array, got '.gettype($protocols));
|
||||||
|
}
|
||||||
|
|
||||||
// public github, autoswitch protocols
|
// public github, autoswitch protocols
|
||||||
if (preg_match('{^(?:https?|git)://'.self::getGitHubDomainsRegex($this->config).'/(.*)}', $url, $match)) {
|
if (preg_match('{^(?:https?|git)://'.self::getGitHubDomainsRegex($this->config).'/(.*)}', $url, $match)) {
|
||||||
if (!is_array($protocols)) {
|
|
||||||
throw new \RuntimeException('Config value "github-protocols" must be an array, got '.gettype($protocols));
|
|
||||||
}
|
|
||||||
$messages = array();
|
$messages = array();
|
||||||
foreach ($protocols as $protocol) {
|
foreach ($protocols as $protocol) {
|
||||||
if ('ssh' === $protocol) {
|
if ('ssh' === $protocol) {
|
||||||
|
|
Loading…
Reference in New Issue