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

committed by
Shivam Mathur

parent
bc40a61480
commit
48f537d6d0
@ -321,6 +321,12 @@ export async function getComposerUrl(version: string): Promise<string> {
|
||||
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