Merge pull request #1480 from igorw/create-config-on-require

Implicitly create composer.json in require command
main
Jordi Boggiano 12 years ago
commit 71435b0b13

@ -54,8 +54,8 @@ EOT
{ {
$file = Factory::getComposerFile(); $file = Factory::getComposerFile();
if (!file_exists($file)) { if (!file_exists($file) && !file_put_contents($file, "{\n}\n")) {
$output->writeln('<error>'.$file.' not found.</error>'); $output->writeln('<error>'.$file.' could not be created.</error>');
return 1; return 1;
} }

Loading…
Cancel
Save