mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +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 () => {
|
it('checking extensionArray', async () => {
|
||||||
expect(await utils.extensionArray('a, b, php_c, php-d')).toEqual([
|
expect(
|
||||||
'a',
|
await utils.extensionArray('a, :b, php_c, php-d, Zend e, :Zend f')
|
||||||
'b',
|
).toEqual(['a', ':b', 'c', 'd', 'e', ':f']);
|
||||||
'c',
|
|
||||||
'd'
|
|
||||||
]);
|
|
||||||
|
|
||||||
expect(await utils.extensionArray('')).toEqual([]);
|
expect(await utils.extensionArray('')).toEqual([]);
|
||||||
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
|
return extension
|
||||||
.trim()
|
.trim()
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.replace(/^php[-_]/, '');
|
.replace(/^(:)?(php[-_]|zend )/, '$1');
|
||||||
})
|
})
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
}
|
}
|
||||||
|
@ -289,7 +289,7 @@ export async function extensionArray(
|
|||||||
return extension
|
return extension
|
||||||
.trim()
|
.trim()
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.replace(/^php[-_]/, '');
|
.replace(/^(:)?(php[-_]|zend )/, '$1');
|
||||||
})
|
})
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user