Skip to content

Commit

Permalink
Fixed non-interactive mode
Browse files Browse the repository at this point in the history
The command was previously interrupting in non-interactive mode.
  • Loading branch information
rapliandras authored and greg0ire committed Feb 14, 2021
1 parent a2aa00e commit df691f8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Command/LoadDataFixturesDoctrineCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
$em = $this->getDoctrine()->getManager($input->getOption('em'));

if (! $input->getOption('append')) {
if (! $ui->confirm(sprintf('Careful, database "%s" will be purged. Do you want to continue?', $em->getConnection()->getDatabase()), ! $input->isInteractive())) {
return 0;
if ($input->isInteractive()) {
if (! $ui->confirm(sprintf('Careful, database "%s" will be purged. Do you want to continue?', $em->getConnection()->getDatabase()), false)) {
return 0;
}
}
}

Expand Down

0 comments on commit df691f8

Please sign in to comment.