diff --git a/inc/console/database/installcommand.class.php b/inc/console/database/installcommand.class.php index ce847436b14ba9ba71685ea4924aaae1840106d0..aa7834901c0a1361f75e6d48f68d07f565f50a77 100644 --- a/inc/console/database/installcommand.class.php +++ b/inc/console/database/installcommand.class.php @@ -156,20 +156,18 @@ class InstallCommand extends Command implements ForceNoPluginsOptionCommandInter protected function interact(InputInterface $input, OutputInterface $output) { - $options = [ - 'db-name' => __('Database name:'), // Required - 'db-user' => __('Database user:'), // Required - 'db-password' => __('Database password:'), // Prompt if null (passed without value) + $questions = [ + 'db-name' => new Question(__('Database name:'), ''), // Required + 'db-user' => new Question(__('Database user:'), ''), // Required + 'db-password' => new Question(__('Database password:'), ''), // Prompt if null (passed without value) ]; - foreach ($options as $name => $label) { + $questions['db-password']->setHidden(true); // Make password input hidden + + foreach ($questions as $name => $question) { if (null === $input->getOption($name)) { /** @var QuestionHelper $question_helper */ $question_helper = $this->getHelper('question'); - $value = $question_helper->ask( - $input, - $output, - new Question($label, '') - ); + $value = $question_helper->ask($input, $output, $question); $input->setOption($name, $value); } }