Skip to content

Commit

Permalink
[database:add] Hide the dbpass on interactive mode (#4041)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjuarez20 authored and enzolutions committed May 16, 2019
1 parent 6fe73b3 commit 610b6d9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Command/Database/AddCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected function configure()
->addOption(
'password',
null,
InputOption::VALUE_REQUIRED,
InputOption::VALUE_OPTIONAL,
$this->trans('commands.database.add.options.password')
)
->addOption(
Expand Down Expand Up @@ -122,9 +122,8 @@ protected function interact(InputInterface $input, OutputInterface $output)
$input->setOption('username', $username);
$password = $input->getOption('password');
if (!$password) {
$password = $this->getIo()->ask(
$this->trans('commands.database.add.questions.password'),
''
$password = $this->getIo()->askHiddenEmpty(
$this->trans('commands.migrate.execute.questions.db-pass')
);
}
$input->setOption('password', $password);
Expand Down

0 comments on commit 610b6d9

Please sign in to comment.