Commit 7128e9a9 authored by Taylor Otwell's avatar Taylor Otwell

Merge pull request #51 from davex69/master

Install into current dir
parents a0a6d8fe bd06802b
......@@ -24,7 +24,7 @@ class NewCommand extends Command
$this
->setName('new')
->setDescription('Create a new Laravel application.')
->addArgument('name', InputArgument::REQUIRED)
->addArgument('name', InputArgument::OPTIONAL)
->addOption('dev', null, InputOption::VALUE_NONE, 'Installs the latest "development" release');
}
......@@ -42,7 +42,7 @@ class NewCommand extends Command
}
$this->verifyApplicationDoesntExist(
$directory = getcwd().'/'.$input->getArgument('name'),
$directory = ($input->getArgument('name')) ? getcwd().'/'.$input->getArgument('name') : getcwd(),
$output
);
......@@ -84,7 +84,7 @@ class NewCommand extends Command
*/
protected function verifyApplicationDoesntExist($directory, OutputInterface $output)
{
if (is_dir($directory) || is_file($directory)) {
if ((is_dir($directory) || is_file($directory)) && $directory != getcwd()) {
throw new RuntimeException('Application already exists!');
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment