diff --git a/src/NewCommand.php b/src/NewCommand.php index aa2310fe..4a03e278 100644 --- a/src/NewCommand.php +++ b/src/NewCommand.php @@ -219,8 +219,10 @@ protected function getVersion(InputInterface $input) */ protected function findComposer() { - if (file_exists(getcwd().'/composer.phar')) { - return '"'.PHP_BINARY.'" composer.phar'; + $composerPath = getcwd().'/composer.phar'; + + if (file_exists($composerPath)) { + return '"'.PHP_BINARY.'" '.$composerPath; } return 'composer';