mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-09-07 13:24:07 +07:00
Allow installing a specific Composer version
This commit is contained in:

committed by
Shivam Mathur

parent
bc40a61480
commit
48f537d6d0
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -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';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user