Skip to content

Commit f0ad065

Browse files
authored
Fixed non-interactive mode
The command was previously interrupting in non-interactive mode.
1 parent 8701896 commit f0ad065

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Command/LoadDataFixturesDoctrineCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
100100
$em = $this->getDoctrine()->getManager($input->getOption('em'));
101101

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

0 commit comments

Comments
 (0)