]>
BookStack Code Mirror - system-cli/commitdiff
projects
/
system-cli
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
e6606fb
)
Added db port support for backup command
author
Dan Brown
<redacted>
Fri, 3 Mar 2023 21:16:15 +0000
(21:16 +0000)
committer
Dan Brown
<redacted>
Thu, 9 Mar 2023 15:28:12 +0000
(15:28 +0000)
scripts/Commands/BackupCommand.php
patch
|
blob
|
history
diff --git
a/scripts/Commands/BackupCommand.php
b/scripts/Commands/BackupCommand.php
index e6cbc909621a4782582437f2209b2cffc293f51c..f2c47a27f73ce1b6fd26322d1befeb4ca2e7758d 100644
(file)
--- a/
scripts/Commands/BackupCommand.php
+++ b/
scripts/Commands/BackupCommand.php
@@
-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}");