|
@@ -168,17 +168,12 @@ EOT
|
|
|
|
|
|
if (empty($package)) {
|
|
if (empty($package)) {
|
|
$options = $input->getOptions();
|
|
$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);
|
|
|
|
- return;
|
|
|
|
- } else {
|
|
|
|
- throw new \InvalidArgumentException('Package ' . $packageFilter . ' not found');
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
|
|
+ if (!isset($options['working-dir']) || !file_exists('composer.json')) {
|
|
throw new \InvalidArgumentException('Package ' . $packageFilter . ' not found');
|
|
throw new \InvalidArgumentException('Package ' . $packageFilter . ' not found');
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ $io->writeError('Package ' . $packageFilter . ' not found in ' . $options['working-dir'] . '/composer.json');
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
$versions = array($package->getPrettyVersion() => $package->getVersion());
|
|
$versions = array($package->getPrettyVersion() => $package->getVersion());
|