Skip to content

Commit

Permalink
Issue drush-ops#5643 - Fix return value of the \Drush\Sql\SqlPgsql::d…
Browse files Browse the repository at this point in the history
…bExists()
  • Loading branch information
Sweetchuck committed Jun 9, 2023
1 parent 4d95c5a commit a5e41cd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Sql/SqlPgsql.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a5e41cd

Please sign in to comment.