Commit 5d0be591 authored by Graham Campbell's avatar Graham Campbell

Throw an exception instead of an exit hack

parent 0ac508b3
<?php namespace Laravel\Installer\Console;
use ZipArchive;
use RuntimeException;
use GuzzleHttp\Client;
use Symfony\Component\Process\Process;
use Symfony\Component\Console\Command\Command;
......@@ -67,9 +68,7 @@ class NewCommand extends Command
protected function verifyApplicationDoesntExist($directory, OutputInterface $output)
{
if (is_dir($directory)) {
$output->writeln('<error>Application already exists!</error>');
exit(1);
throw new RuntimeException('Application already exists!</error>');
}
}
......
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