1
0
Fork 0

Merge branch '1.7'

pull/7563/head
Jordi Boggiano 2018-08-16 16:50:10 +02:00
commit 15313209d6
3 changed files with 22 additions and 11 deletions

10
composer.lock generated
View File

@ -187,16 +187,16 @@
},
{
"name": "composer/xdebug-handler",
"version": "1.1.0",
"version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/composer/xdebug-handler.git",
"reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08"
"reference": "e1809da56ce1bd1b547a752936817341ac244d8e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/c919dc6c62e221fc6406f861ea13433c0aa24f08",
"reference": "c919dc6c62e221fc6406f861ea13433c0aa24f08",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/e1809da56ce1bd1b547a752936817341ac244d8e",
"reference": "e1809da56ce1bd1b547a752936817341ac244d8e",
"shasum": ""
},
"require": {
@ -227,7 +227,7 @@
"Xdebug",
"performance"
],
"time": "2018-04-11T15:42:36+00:00"
"time": "2018-08-16T10:54:23+00:00"
},
{
"name": "justinrainbow/json-schema",

View File

@ -345,10 +345,6 @@ EOT
$package = $package->getAliasOf();
}
if (0 === strpos($package->getPrettyVersion(), 'dev-') && in_array($package->getSourceType(), array('git', 'hg'))) {
$package->setSourceReference(substr($package->getPrettyVersion(), 4));
}
$dm = $this->createDownloadManager($io, $config);
$dm->setPreferSource($preferSource)
->setPreferDist($preferDist)

View File

@ -13,6 +13,7 @@
namespace Composer\Command;
use Composer\Factory;
use Composer\Util\Filesystem;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\StringInput;
@ -75,8 +76,22 @@ EOT
// change to global dir
$config = Factory::createConfig();
chdir($config->get('home'));
$this->getIO()->writeError('<info>Changed current directory to '.$config->get('home').'</info>');
$home = $config->get('home');
if (!is_dir($home)) {
$fs = new Filesystem();
$fs->ensureDirectoryExists($home);
if (!is_dir($home)) {
throw new \RuntimeException('Could not create home directory');
}
}
try {
chdir($home);
} catch (\Exception $e) {
throw new \RuntimeException('Could not switch to home directory "'.$home.'"', 0, $e);
}
$this->getIO()->writeError('<info>Changed current directory to '.$home.'</info>');
// create new input without "global" command prefix
$input = new StringInput(preg_replace('{\bg(?:l(?:o(?:b(?:a(?:l)?)?)?)?)?\b}', '', $input->__toString(), 1));