Commit 41b4e7ec authored by Alex Bowers's avatar Alex Bowers

Throw error if a file exists with that name

parent bfcc6fe7
...@@ -87,6 +87,10 @@ class NewCommand extends Command ...@@ -87,6 +87,10 @@ class NewCommand extends Command
if (is_dir($directory)) { if (is_dir($directory)) {
throw new RuntimeException('Application already exists!'); throw new RuntimeException('Application already exists!');
} }
if (is_file($directory)) {
throw new RuntimeException('Cannot make an Application with that name due to a naming conflict!');
}
} }
/** /**
......
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