Fix mysql regex for windows in extensions.ts

This commit is contained in:
Shivam Mathur 2021-04-27 15:17:29 +05:30
parent b0559f7f8e
commit 15c43e89cd
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
2 changed files with 6 additions and 4 deletions

4
dist/index.js vendored
View File

@ -284,11 +284,11 @@ async function addExtensionWindows(extension_csv, version) {
case /(5\.[3-6]|7\.0)pcov/.test(version_extension):
add_script += await utils.getUnsupportedLog('pcov', version, 'win32');
break;
case /^5\.[3-6](mysql|mysqli|mysqlnd)$/.test(version_extension):
case /^5\.[3-6](?<!pdo_)(mysql|mysqli|mysqlnd)$/.test(version_extension):
add_script +=
'\nAdd-Extension mysql\nAdd-Extension mysqli\nAdd-Extension mysqlnd';
break;
case /(?<!5\.[3-6])(mysql|mysqli|mysqlnd)$/.test(version_extension):
case /(?<!5\.[3-6])(?<!pdo_)(mysql|mysqli|mysqlnd)$/.test(version_extension):
add_script += '\nAdd-Extension mysqli\nAdd-Extension mysqlnd';
break;
case /^sqlite$/.test(extension):

View File

@ -183,12 +183,14 @@ export async function addExtensionWindows(
add_script += await utils.getUnsupportedLog('pcov', version, 'win32');
break;
// match 5.3 to 5.6 - mysql, mysqli, mysqlnd
case /^5\.[3-6](mysql|mysqli|mysqlnd)$/.test(version_extension):
case /^5\.[3-6](?<!pdo_)(mysql|mysqli|mysqlnd)$/.test(version_extension):
add_script +=
'\nAdd-Extension mysql\nAdd-Extension mysqli\nAdd-Extension mysqlnd';
break;
// match 7.0 and newer mysql, mysqli and mysqlnd
case /(?<!5\.[3-6])(mysql|mysqli|mysqlnd)$/.test(version_extension):
case /(?<!5\.[3-6])(?<!pdo_)(mysql|mysqli|mysqlnd)$/.test(
version_extension
):
add_script += '\nAdd-Extension mysqli\nAdd-Extension mysqlnd';
break;
// match sqlite