Added db port support for backup command
This commit is contained in:
parent
ead5ebbee1
commit
ff0c183a66
1 changed files with 5 additions and 0 deletions
|
@ -150,6 +150,11 @@ final class BackupCommand
|
|||
'database' => ($_SERVER['DB_DATABASE'] ?? ''),
|
||||
];
|
||||
|
||||
$port = $_SERVER['DB_PORT'] ?? '';
|
||||
if ($port) {
|
||||
$dbOptions['host'] .= ':' . $port;
|
||||
}
|
||||
|
||||
foreach ($dbOptions as $name => $option) {
|
||||
if (!$option) {
|
||||
throw new CommandError("Could not find a value for the database {$name}");
|
||||
|
|
Loading…
Reference in a new issue