mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Do not quote ini values with error constants
This commit is contained in:
parent
ecc8611061
commit
1686147b24
@ -136,6 +136,9 @@ describe('Utils tests', () => {
|
||||
'b=3, 4',
|
||||
'c=5'
|
||||
]);
|
||||
expect(
|
||||
await utils.CSVArray('a=E_ALL, b=E_ALL & ~ E_ALL, c="E_ALL", d=\'E_ALL\'')
|
||||
).toEqual(['a=E_ALL', 'b=E_ALL & ~ E_ALL', 'c=E_ALL', 'd=E_ALL']);
|
||||
expect(await utils.CSVArray('')).toEqual([]);
|
||||
expect(await utils.CSVArray(' ')).toEqual([]);
|
||||
});
|
||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -1285,7 +1285,7 @@ async function CSVArray(values_csv) {
|
||||
return value
|
||||
.trim()
|
||||
.replace(/^["']|["']$|(?<==)["']/g, '')
|
||||
.replace(/=(.*[?{}|&~![()^]+.*)/, "='$1'");
|
||||
.replace(/=(((?!E_).)*[?{}|&~![()^]+((?!E_).)+)/, "='$1'");
|
||||
})
|
||||
.filter(Boolean);
|
||||
}
|
||||
|
@ -273,7 +273,7 @@ export async function CSVArray(values_csv: string): Promise<Array<string>> {
|
||||
return value
|
||||
.trim()
|
||||
.replace(/^["']|["']$|(?<==)["']/g, '')
|
||||
.replace(/=(.*[?{}|&~![()^]+.*)/, "='$1'");
|
||||
.replace(/=(((?!E_).)*[?{}|&~![()^]+((?!E_).)+)/, "='$1'");
|
||||
})
|
||||
.filter(Boolean);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user