Skip to content

Commit

Permalink
Fix ask password for docker installation
Browse files Browse the repository at this point in the history
  • Loading branch information
vtsykun committed Mar 5, 2023
1 parent 1c15cfc commit 18615f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/usage/mirroring.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Mirroring and Composer proxies

Packeton can function as a proxy for the Composer repository, including requiring an authorization.
Packeton can function as a proxy for the Composer repository, including which require authentication.
This feature can be used to grant all developers and clients access to private repositories such as Magento.
Additionally, it is possible to create ZIP archives from mirrored Git repositories of packages, in cases where HTTP dist
is unavailable.
Expand Down
7 changes: 5 additions & 2 deletions src/Command/UserManagerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int

if ($input->hasOption('password')) {
$io->writeln("Creating a user {$username}...");
$password = $io->askHidden('Enter password');
$input->setOption('password', $password);

if (empty($input->getOption('password'))) {
$password = $io->askHidden('Enter password');
$input->setOption('password', $password);
}
}

$password = $input->getOption('password') ?: hash('sha512', random_bytes(50));
Expand Down

0 comments on commit 18615f2

Please sign in to comment.