1
0
Fork 0

Clarify that composer.json is being read and not downloaded, refs #2096

pull/2157/merge
Jordi Boggiano 2013-08-10 14:22:11 +02:00
parent 22369fd3ae
commit e99b327342
2 changed files with 3 additions and 3 deletions

View File

@ -126,7 +126,7 @@ class Factory
public static function getComposerFile()
{
return trim(getenv('COMPOSER')) ?: 'composer.json';
return trim(getenv('COMPOSER')) ?: './composer.json';
}
public static function createAdditionalStyles()
@ -191,7 +191,7 @@ class Factory
$file = new JsonFile($localConfig, new RemoteFilesystem($io));
if (!$file->exists()) {
if ($localConfig === 'composer.json') {
if ($localConfig === './composer.json' || $localConfig === 'composer.json') {
$message = 'Composer could not find a composer.json file in '.getcwd();
} else {
$message = 'Composer could not find the config file: '.$localConfig;

View File

@ -107,7 +107,7 @@ class RemoteFilesystem
$options = $this->getOptionsForUrl($originUrl, $additionalOptions);
if ($this->io->isDebug()) {
$this->io->write('Downloading '.$fileUrl);
$this->io->write((substr($fileUrl, 0, 4) === 'http' ? 'Downloading ' : 'Reading ') . $fileUrl);
}
if (isset($options['github-token'])) {
$fileUrl .= (false === strpos($fileUrl, '?') ? '?' : '&') . 'access_token='.$options['github-token'];