Skip to content

Commit 28bec50

Browse files
authored
Merge pull request #99 from SjorsO/patch-1
Create a new project in the current directory using "laravel new ."
2 parents 9e48315 + c518b36 commit 28bec50

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/NewCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
4444
throw new RuntimeException('The Zip PHP extension is not installed. Please install it and try again.');
4545
}
4646

47-
$directory = ($input->getArgument('name')) ? getcwd().'/'.$input->getArgument('name') : getcwd();
47+
$name = $input->getArgument('name');
48+
49+
$directory = $name && $name !== '.' ? getcwd().'/'.$name : getcwd();
4850

4951
if (! $input->getOption('force')) {
5052
$this->verifyApplicationDoesntExist($directory);

0 commit comments

Comments
 (0)