Skip to content

Commit 0062c4b

Browse files
authored
Add warning about --force and installing in current directory (#152)
1 parent 94acfbd commit 0062c4b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/NewCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
7474
$this->verifyApplicationDoesntExist($directory);
7575
}
7676

77+
if ($input->getOption('force') && $directory === '.') {
78+
throw new RuntimeException('Cannot use --force option when using current directory for installation!');
79+
}
80+
7781
$composer = $this->findComposer();
7882

7983
$commands = [

0 commit comments

Comments
 (0)