1
0
Fork 0

Chore: Use consistent directory path

Only when a install directory was not specified, was the CWD prepended to `$directory`. This change provides consistency in paths displayed to the user.
pull/8412/head
polarathene 2019-11-05 21:14:22 +13:00
parent 1b2582ff5b
commit 43e0321ee7
1 changed files with 2 additions and 1 deletions

View File

@ -282,9 +282,10 @@ EOT
// if no directory was specified, use the 2nd part of the package name // if no directory was specified, use the 2nd part of the package name
if (null === $directory) { if (null === $directory) {
$parts = explode("/", $name, 2); $parts = explode("/", $name, 2);
$directory = getcwd() . DIRECTORY_SEPARATOR . array_pop($parts); $directory = array_pop($parts);
} }
$directory = getcwd() . DIRECTORY_SEPARATOR . $directory;
$io->writeError('<info>Creating a "' . $packageName . '" project at "' . $directory . '"</info>'); $io->writeError('<info>Creating a "' . $packageName . '" project at "' . $directory . '"</info>');
$fs = new Filesystem(); $fs = new Filesystem();