Output a hint that maybe you are not in the right directory, fixes #8404
parent
149250ab92
commit
af86ca1fb3
|
@ -139,7 +139,15 @@ EOT
|
||||||
}
|
}
|
||||||
|
|
||||||
$phpVersion = $this->repos->findPackage('php', '*')->getPrettyVersion();
|
$phpVersion = $this->repos->findPackage('php', '*')->getPrettyVersion();
|
||||||
$requirements = $this->determineRequirements($input, $output, $input->getArgument('packages'), $phpVersion, $preferredStability, !$input->getOption('no-update'));
|
try {
|
||||||
|
$requirements = $this->determineRequirements($input, $output, $input->getArgument('packages'), $phpVersion, $preferredStability, !$input->getOption('no-update'));
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
if ($this->newlyCreated) {
|
||||||
|
throw new \RuntimeException('No composer.json present in the current directory, this may be the cause of the following exception.', 0, $e);
|
||||||
|
}
|
||||||
|
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
|
||||||
$requireKey = $input->getOption('dev') ? 'require-dev' : 'require';
|
$requireKey = $input->getOption('dev') ? 'require-dev' : 'require';
|
||||||
$removeKey = $input->getOption('dev') ? 'require' : 'require-dev';
|
$removeKey = $input->getOption('dev') ? 'require' : 'require-dev';
|
||||||
|
|
Loading…
Reference in New Issue