diff --git a/src/Console/Command/ConfigureCommand.php b/src/Console/Command/ConfigureCommand.php index 8284eecf4..f7ea2fc64 100644 --- a/src/Console/Command/ConfigureCommand.php +++ b/src/Console/Command/ConfigureCommand.php @@ -147,13 +147,15 @@ protected function buildConfiguration(InputInterface $input, OutputInterface $ou $binDir = $helper->ask($input, $output, $question); // Search tasks - $question = new ChoiceQuestion( - 'Which tasks do you want to run?', - $this->getAvailableTasks($this->config), - [] - ); - $question->setMultiselect(true); - $tasks = $helper->ask($input, $output, $question); + $tasks = []; + if ($input->isInteractive()) { + $question = new ChoiceQuestion( + 'Which tasks do you want to run?', + $this->getAvailableTasks($this->config) + ); + $question->setMultiselect(true); + $tasks = (array) $helper->ask($input, $output, $question); + } // Build configuration return [