diff --git a/src/Composer/Command/InitCommand.php b/src/Composer/Command/InitCommand.php index c352b1829..d8ebe2e09 100644 --- a/src/Composer/Command/InitCommand.php +++ b/src/Composer/Command/InitCommand.php @@ -115,7 +115,7 @@ EOT } } - $file = new JsonFile('composer.json'); + $file = new JsonFile(Factory::getComposerFile()); $json = $file->encode($options); if ($input->isInteractive()) {