mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-08-31 09:54:09 +07:00
Add support for tools: none
This commit is contained in:
10
dist/index.js
vendored
10
dist/index.js
vendored
@ -2452,7 +2452,13 @@ exports.addPackage = addPackage;
|
||||
* @param os_version
|
||||
*/
|
||||
async function addTools(tools_csv, php_version, os_version) {
|
||||
let script = '\n' + (await utils.stepLog('Setup Tools', os_version));
|
||||
let script = '\n';
|
||||
if (tools_csv === 'none') {
|
||||
return '';
|
||||
}
|
||||
else {
|
||||
script += await utils.stepLog('Setup Tools', os_version);
|
||||
}
|
||||
const tools_list = await addComposer(await utils.CSVArray(tools_csv));
|
||||
await utils.asyncForEach(tools_list, async function (release) {
|
||||
const tool_data = await parseTool(release);
|
||||
@ -2575,6 +2581,8 @@ async function addTools(tools_csv, php_version, os_version) {
|
||||
url = github + (await getWpCliUrl(version));
|
||||
script += await addArchive('wp-cli', url, os_version, '"--version"');
|
||||
break;
|
||||
case /^none$/.test(tool):
|
||||
break;
|
||||
case /^[\w.-]+\/[\w.-]+$/.test(tool):
|
||||
script += await addPackage(tool.split('/')[1], release.split('/')[1].replace(/\s+/, ''), tool.split('/')[0] + '/', os_version);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user