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,