Allow installing a specific Composer version

This commit is contained in:
Michele Locati
2020-10-30 11:15:26 +01:00
committed by Shivam Mathur
parent bc40a61480
commit 48f537d6d0
3 changed files with 19 additions and 0 deletions

4
dist/index.js vendored
View File

@ -1930,6 +1930,10 @@ async function getComposerUrl(version) {
case '2':
return (cache_url + 'https://getcomposer.org/composer-' + version + '.phar');
default:
if (/^\d+\.\d+\.\d+[\w-]*$/.test(version)) {
return (cache_url +
`https://github.com/composer/composer/releases/download/${version}/composer.phar`);
}
return cache_url + 'https://getcomposer.org/composer-stable.phar';
}
}