Skip to content
Permalink
Browse files

Fix format of command to restore PostreSQL db (#3849)

  • Loading branch information...
LOBsTerr authored and jmolivas committed Apr 22, 2018
1 parent 73139e3 commit b5daec523618c877f1ac02f311fcc4cbb5f9f918
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/Command/Database/RestoreCommand.php
@@ -77,9 +77,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
return 1;
}
if (strpos($file, '.sql.gz') !== false) {
$catCommand = "gunzip -c %s | ";
$catCommand = 'gunzip -c %s | ';
} else {
$catCommand = "cat %s | ";
$catCommand = 'cat %s | ';
}
if ($databaseConnection['driver'] == 'mysql') {
$command = sprintf(
@@ -93,7 +93,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
);
} elseif ($databaseConnection['driver'] == 'pgsql') {
$command = sprintf(
'PGPASSWORD="%s" ' . $catCommand . 'psql -w -U %s -h %s -p %s -d %s',
$catCommand . 'PGPASSWORD="%s" psql -w -U %s -h %s -p %s -d %s',
$file,
$databaseConnection['password'],
$databaseConnection['username'],

0 comments on commit b5daec5

Please sign in to comment.
You can’t perform that action at this time.