From 229e83f0e31b98720d68d8ba4c2cb3b64744a3d5 Mon Sep 17 00:00:00 2001 From: elrrrrrrr Date: Thu, 7 Dec 2023 19:07:02 +0800 Subject: [PATCH] Update sources/corepackUtils.ts Co-authored-by: Kristoffer K. --- sources/corepackUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/corepackUtils.ts b/sources/corepackUtils.ts index 6334231f8..b776de119 100644 --- a/sources/corepackUtils.ts +++ b/sources/corepackUtils.ts @@ -117,7 +117,7 @@ export async function installVersion(installTarget: string, locator: Locator, {s }; } - const defaultNpmRegistryURL = spec.url.replace(/\{\}/g, version); + const defaultNpmRegistryURL = spec.url.replaceAll(`{}`, version); const url = process.env.COREPACK_NPM_REGISTRY ? defaultNpmRegistryURL.replace( npmRegistryUtils.DEFAULT_NPM_REGISTRY_URL,