Simplify code and fix path to composer.json, refs #6001
parent
afdae9c0e2
commit
ed0829fed1
|
@ -168,17 +168,12 @@ EOT
|
|||
|
||||
if (empty($package)) {
|
||||
$options = $input->getOptions();
|
||||
if (isset($options['working-dir'])) {
|
||||
$composer_json = $options['working-dir'] . '/composer.json';
|
||||
if (file_exists($composer_json)) {
|
||||
$io->writeError('Package ' . $packageFilter . ' not found in ' . $composer_json);
|
||||
if (!isset($options['working-dir']) || !file_exists('composer.json')) {
|
||||
throw new \InvalidArgumentException('Package ' . $packageFilter . ' not found');
|
||||
}
|
||||
|
||||
$io->writeError('Package ' . $packageFilter . ' not found in ' . $options['working-dir'] . '/composer.json');
|
||||
return;
|
||||
} else {
|
||||
throw new \InvalidArgumentException('Package ' . $packageFilter . ' not found');
|
||||
}
|
||||
} else {
|
||||
throw new \InvalidArgumentException('Package ' . $packageFilter . ' not found');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$versions = array($package->getPrettyVersion() => $package->getVersion());
|
||||
|
|
Loading…
Reference in New Issue