1
0
Fork 0

Allow for file://-URLs here as well

pull/154/head
Matthias Pigulla 2011-12-09 23:37:52 +01:00
parent 2fc8e06d81
commit 4e1cb32f8c
1 changed files with 2 additions and 1 deletions

View File

@ -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'], '/');