mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-25 05:01:07 +07:00
Update utils.ts
This commit is contained in:
parent
2810265746
commit
1a102bc9f2
@ -59,7 +59,7 @@ export async function getManifestURL(): Promise<string> {
|
|||||||
*/
|
*/
|
||||||
export async function parseVersion(version: string): Promise<string> {
|
export async function parseVersion(version: string): Promise<string> {
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case /^(latest|nightly|\d+\.x)$/.test(version):
|
case /^(latest|lowest|nightly|\d+\.x)$/.test(version):
|
||||||
return JSON.parse((await fetch.fetch(await getManifestURL()))['data'])[
|
return JSON.parse((await fetch.fetch(await getManifestURL()))['data'])[
|
||||||
version
|
version
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user