diff --git a/__tests__/extensions.test.ts b/__tests__/extensions.test.ts index f62afccf..14b94023 100644 --- a/__tests__/extensions.test.ts +++ b/__tests__/extensions.test.ts @@ -49,7 +49,7 @@ describe('Extension tests', () => { it('checking addExtensionOnLinux', async () => { let linux: string = await extensions.addExtension( - 'Xdebug, pcov, sqlite, ast-beta, pdo_mysql, pdo-odbc, xdebug-alpha, grpc-1.2.3', + 'Xdebug, pcov, sqlite, ast, uopz, ast-beta, pdo_mysql, pdo-odbc, xdebug-alpha, grpc-1.2.3', '7.4', 'linux' ); @@ -58,6 +58,8 @@ describe('Extension tests', () => { expect(linux).toContain( 'sudo $debconf_fix apt-get install -y php7.4-sqlite3' ); + expect(linux).toContain('sudo $debconf_fix apt-get install -y php-ast'); + expect(linux).toContain('sudo $debconf_fix apt-get install -y php-uopz'); expect(linux).toContain('add_unstable_extension ast beta extension'); expect(linux).toContain('add_pdo_extension mysql'); expect(linux).toContain('add_pdo_extension odbc'); diff --git a/dist/index.js b/dist/index.js index 363ec86f..7ce31cb5 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2801,6 +2801,10 @@ async function addExtensionLinux(extension_csv, version, pipe) { extension = extension.replace('pdo_', '').replace('pdo-', ''); script += '\nadd_pdo_extension ' + extension; return; + // match ast and uopz + case /^(ast|uopz)$/.test(extension): + command = command_prefix + '-' + extension + pipe; + break; // match sqlite case /^sqlite$/.test(extension): extension = 'sqlite3'; diff --git a/src/extensions.ts b/src/extensions.ts index 52b64e76..d6236fd9 100644 --- a/src/extensions.ts +++ b/src/extensions.ts @@ -281,6 +281,10 @@ export async function addExtensionLinux( extension = extension.replace('pdo_', '').replace('pdo-', ''); script += '\nadd_pdo_extension ' + extension; return; + // match ast and uopz + case /^(ast|uopz)$/.test(extension): + command = command_prefix + '-' + extension + pipe; + break; // match sqlite case /^sqlite$/.test(extension): extension = 'sqlite3';