Skip to content

Commit d265e4c

Browse files
committed
AC-12085:: Have handled exception for maridb-dump command not found
1 parent 3bb4c0f commit d265e4c

File tree

1 file changed

+9
-6
lines changed
  • dev/tests/integration/framework/Magento/TestFramework/Db

1 file changed

+9
-6
lines changed

dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,14 +272,17 @@ private function isUsingAuroraDb(): bool
272272
*/
273273
private function isMariaDB(): bool
274274
{
275-
if (!$this->isMariaDB) {
276-
$version = $this->_shell->execute(
277-
'mariadb-dump --version'
278-
);
275+
try {
276+
if (!$this->isMariaDB) {
277+
$version = $this->_shell->execute(
278+
'mariadb-dump --version'
279+
);
279280

280-
$this->isMariaDB = (bool) preg_match('/-MariaDB/i', $version);
281+
$this->isMariaDB = (bool) preg_match('/-MariaDB/i', $version);
282+
}
283+
} catch (LocalizedException $e) {
284+
$this->isMariaDB = false;
281285
}
282-
283286
return $this->isMariaDB;
284287
}
285288
}

0 commit comments

Comments
 (0)