Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/NewCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ protected function execute(InputInterface $input, OutputInterface $output)
if (PHP_OS_FAMILY == 'Windows') {
array_unshift($commands, "rd /s /q \"$directory\"");
} else {
array_unshift($commands, "rm -rf $directory");
array_unshift($commands, "rm -rf \"$directory\"");
}
}

if (PHP_OS_FAMILY != 'Windows') {
$commands[] = "chmod 644 $directory/artisan";
$commands[] = "chmod 644 \"$directory/artisan\"";
}

if ($this->runCommands($commands, $input, $output)->isSuccessful()) {
if (($process = $this->runCommands($commands, $input, $output))->isSuccessful()) {
if ($name && $name !== '.') {
$this->replaceInFile(
'APP_URL=http://localhost',
Expand All @@ -114,7 +114,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$output->writeln(PHP_EOL.'<comment>Application ready! Build something amazing.</comment>');
}

return 0;
return $process->getExitCode();
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/NewCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function test_it_can_scaffold_a_new_laravel_app()
if (PHP_OS_FAMILY == 'Windows') {
exec("rd /s /q \"$scaffoldDirectory\"");
} else {
exec("rm -rf $scaffoldDirectory");
exec("rm -rf \"$scaffoldDirectory\"");
}
}

Expand Down