From a5e41cdb1e3175bc0d4e28e5aa1da6bdd05e7587 Mon Sep 17 00:00:00 2001 From: Andor Date: Fri, 9 Jun 2023 13:26:20 +0200 Subject: [PATCH] Issue #5643 - Fix return value of the \Drush\Sql\SqlPgsql::dbExists() --- src/Sql/SqlPgsql.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Sql/SqlPgsql.php b/src/Sql/SqlPgsql.php index 89d7c6059f..d5f8dd0f7a 100644 --- a/src/Sql/SqlPgsql.php +++ b/src/Sql/SqlPgsql.php @@ -101,7 +101,9 @@ public function dbExists(): bool $process = Drush::shell($sql_no_db->connect() . ' -t -c ' . $query, null, $this->getEnv()); $process->setSimulated(false); $process->run(); - return $process->isSuccessful(); + + return $process->isSuccessful() + && trim($process->getOutput() === '1'); } public function queryFormat($query)