commit
82a2a1f7ac
|
@ -26,7 +26,8 @@ class ComposerRepository extends ArrayRepository
|
|||
|
||||
public function __construct(array $config)
|
||||
{
|
||||
if (!preg_match('{^https?://}', $config['url'])) {
|
||||
if (!preg_match('{^\w+://}', $config['url'])) {
|
||||
// assume http as the default protocol
|
||||
$config['url'] = 'http://'.$config['url'];
|
||||
}
|
||||
$config['url'] = rtrim($config['url'], '/');
|
||||
|
|
|
@ -180,8 +180,7 @@ class HgDriver implements VcsDriverInterface
|
|||
return false;
|
||||
}
|
||||
|
||||
exec(sprintf('hg identify %s', escapeshellarg($url)), $output);
|
||||
|
||||
return (boolean)$output;
|
||||
exec(sprintf('hg identify %s', escapeshellarg($url)), $ignored, $exit);
|
||||
return $exit === 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@ class SvnDriver implements VcsDriverInterface
|
|||
return false;
|
||||
}
|
||||
|
||||
exec(sprintf('svn info --non-interactive %s', escapeshellarg($url)), $output);
|
||||
return preg_match('{^Repository UUID:}m', implode("\n", $output)) >= 1;
|
||||
exec(sprintf('svn info --non-interactive %s 2>/dev/null', escapeshellarg($url)), $ignored, $exit);
|
||||
return $exit === 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue