Skip to content

Commit 4d0d4d1

Browse files
committed
Update getting version from db, add mariadb support
1 parent b7e5ea0 commit 4d0d4d1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utils/behat-tags.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ function version_tags(
4141
}
4242

4343
function get_db_version() {
44-
preg_match( '@[0-9]+\.[0-9]+\.[0-9]+@', exec( 'mysql -V' ), $version );
44+
$version_string = exec( getenv( 'WP_CLI_TEST_DBTYPE' ) === 'mariadb' ? 'mariadb --version' : 'mysql -V' );
45+
preg_match( '@[0-9]+\.[0-9]+\.[0-9]+@', $version_string, $version );
4546
return $version[0];
4647
}
4748

0 commit comments

Comments
 (0)