mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-08-31 18:04:10 +07:00
Allow installing a specific Composer version
This commit is contained in:
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -2058,6 +2058,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';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user