mirror of
https://github.com/composer/composer
synced 2025-05-10 09:02:59 +00:00
Suggest using -p when a platform package can not be found in show command
This commit is contained in:
parent
1f261f1f7a
commit
b9d00153d9
1 changed files with 3 additions and 0 deletions
|
@ -201,6 +201,9 @@ EOT
|
|||
if (empty($package)) {
|
||||
$options = $input->getOptions();
|
||||
if (!isset($options['working-dir']) || !file_exists('composer.json')) {
|
||||
if (preg_match(PlatformRepository::PLATFORM_PACKAGE_REGEX, $input->getArgument('package')) && !$input->getOption('platform')) {
|
||||
throw new \InvalidArgumentException('Package ' . $packageFilter . ' not found, try using --platform (-p) to show platform packages.');
|
||||
}
|
||||
throw new \InvalidArgumentException('Package ' . $packageFilter . ' not found');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue