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): case /(5\.[3-6]|7\.0)pcov/.test(version_extension):
add_script += await utils.getUnsupportedLog('pcov', version, 'win32'); add_script += await utils.getUnsupportedLog('pcov', version, 'win32');
break; break;
case /^5\.[3-6](mysql|mysqli|mysqlnd)$/.test(version_extension): case /^5\.[3-6](?<!pdo_)(mysql|mysqli|mysqlnd)$/.test(version_extension):
add_script += add_script +=
'\nAdd-Extension mysql\nAdd-Extension mysqli\nAdd-Extension mysqlnd'; '\nAdd-Extension mysql\nAdd-Extension mysqli\nAdd-Extension mysqlnd';
break; 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'; add_script += '\nAdd-Extension mysqli\nAdd-Extension mysqlnd';
break; break;
case /^sqlite$/.test(extension): case /^sqlite$/.test(extension):

View File

@ -183,12 +183,14 @@ export async function addExtensionWindows(
add_script += await utils.getUnsupportedLog('pcov', version, 'win32'); add_script += await utils.getUnsupportedLog('pcov', version, 'win32');
break; break;
// match 5.3 to 5.6 - mysql, mysqli, mysqlnd // 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 += add_script +=
'\nAdd-Extension mysql\nAdd-Extension mysqli\nAdd-Extension mysqlnd'; '\nAdd-Extension mysql\nAdd-Extension mysqli\nAdd-Extension mysqlnd';
break; break;
// match 7.0 and newer mysql, mysqli and mysqlnd // 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'; add_script += '\nAdd-Extension mysqli\nAdd-Extension mysqlnd';
break; break;
// match sqlite // match sqlite