修改install
This commit is contained in:
parent
b998d58dea
commit
3a58e928b6
@ -129,11 +129,17 @@ class InstallCommand extends Command
|
|||||||
$prefix = $this->output->ask($this->input, '👉 please input table prefix, default (null):') ? : '';
|
$prefix = $this->output->ask($this->input, '👉 please input table prefix, default (null):') ? : '';
|
||||||
$username = $this->output->ask($this->input, '👉 please input database username default (root): ') ? : 'root';
|
$username = $this->output->ask($this->input, '👉 please input database username default (root): ') ? : 'root';
|
||||||
$password = '';
|
$password = '';
|
||||||
|
$tryTimes = 0;
|
||||||
while (!$password) {
|
while (!$password) {
|
||||||
$password = $this->output->ask($this->input, '👉 please input database password: ');
|
$password = $this->output->ask($this->input, '👉 please input database password: ');
|
||||||
if ($password) {
|
if ($password) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// 尝试三次以上未填写,视为密码空
|
||||||
|
$tryTimes++;
|
||||||
|
if (!$password && $tryTimes > 2) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->databaseLink = [$host, $database, $username, $password, $port, $charset, $prefix];
|
$this->databaseLink = [$host, $database, $username, $password, $port, $charset, $prefix];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user