mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 11:51:07 +07:00
Fix parsing extensions input if Zend OPcache
is specified instead of opcache
This commit is contained in:
parent
c8837583fc
commit
8e80635955
@ -126,12 +126,9 @@ describe('Utils tests', () => {
|
||||
});
|
||||
|
||||
it('checking extensionArray', async () => {
|
||||
expect(await utils.extensionArray('a, b, php_c, php-d')).toEqual([
|
||||
'a',
|
||||
'b',
|
||||
'c',
|
||||
'd'
|
||||
]);
|
||||
expect(
|
||||
await utils.extensionArray('a, :b, php_c, php-d, Zend e, :Zend f')
|
||||
).toEqual(['a', ':b', 'c', 'd', 'e', ':f']);
|
||||
|
||||
expect(await utils.extensionArray('')).toEqual([]);
|
||||
expect(await utils.extensionArray(' ')).toEqual([]);
|
||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -1050,7 +1050,7 @@ async function extensionArray(extension_csv) {
|
||||
return extension
|
||||
.trim()
|
||||
.toLowerCase()
|
||||
.replace(/^php[-_]/, '');
|
||||
.replace(/^(:)?(php[-_]|zend )/, '$1');
|
||||
})
|
||||
.filter(Boolean);
|
||||
}
|
||||
|
@ -289,7 +289,7 @@ export async function extensionArray(
|
||||
return extension
|
||||
.trim()
|
||||
.toLowerCase()
|
||||
.replace(/^php[-_]/, '');
|
||||
.replace(/^(:)?(php[-_]|zend )/, '$1');
|
||||
})
|
||||
.filter(Boolean);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user