From b5daec523618c877f1ac02f311fcc4cbb5f9f918 Mon Sep 17 00:00:00 2001 From: Nikolay Lobachev Date: Sun, 22 Apr 2018 21:19:44 +0200 Subject: [PATCH] Fix format of command to restore PostreSQL db (#3849) --- src/Command/Database/RestoreCommand.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Command/Database/RestoreCommand.php b/src/Command/Database/RestoreCommand.php index 659f158d6..b4ce3dd2a 100644 --- a/src/Command/Database/RestoreCommand.php +++ b/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'],