Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Properly set mysql path and error if we don't find anything
  • Loading branch information
mrsdizzie committed Mar 28, 2025
commit 4f8a636d837e5df8991a33987d95a24068d8252f
5 changes: 5 additions & 0 deletions php/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -1877,6 +1877,7 @@ function get_mysql_binary_path() {

if ( 0 === $mysql->return_code ) {
if ( '' !== $mysql_binary ) {
$path = $mysql_binary;
$result = Process::create( "$mysql_binary --version", null, null )->run();

// It's actually MariaDB disguised as MySQL.
Expand All @@ -1888,6 +1889,10 @@ function get_mysql_binary_path() {
$path = $mariadb_binary;
}

if ( '' === $path ) {
WP_CLI::Error( 'Could not find mysql binary' );
}

return $path;
}

Expand Down