diff --git a/src/Composer/Command/CreateProjectCommand.php b/src/Composer/Command/CreateProjectCommand.php index 02ec63c9e..2ebf3f8c0 100644 --- a/src/Composer/Command/CreateProjectCommand.php +++ b/src/Composer/Command/CreateProjectCommand.php @@ -282,9 +282,10 @@ EOT // if no directory was specified, use the 2nd part of the package name if (null === $directory) { $parts = explode("/", $name, 2); - $directory = getcwd() . DIRECTORY_SEPARATOR . array_pop($parts); + $directory = array_pop($parts); } + $directory = getcwd() . DIRECTORY_SEPARATOR . $directory; $io->writeError('Creating a "' . $packageName . '" project at "' . $directory . '"'); $fs = new Filesystem();