1
0
Fork 0

Add COMPOSER env var to override the composer.json file name

pull/138/head
Jordi Boggiano 2011-11-30 21:50:11 +01:00
parent 94e277698e
commit 7fa74f8f8e
1 changed files with 3 additions and 2 deletions

View File

@ -75,7 +75,7 @@ class Application extends BaseApplication
{
// load Composer configuration
if (null === $composerFile) {
$composerFile = 'composer.json';
$composerFile = getenv('COMPOSER') ?: 'composer.json';
}
$file = new JsonFile($composerFile);
@ -133,7 +133,8 @@ class Application extends BaseApplication
}
// init locker
$locker = new Package\Locker(new JsonFile('composer.lock'), $rm);
$lockFile = substr($composerFile, -5) === '.json' ? substr($composerFile, 0, -4).'lock' : $composerFile . '.lock';
$locker = new Package\Locker(new JsonFile($lockFile), $rm);
// initialize composer
$composer = new Composer();