-
-
Notifications
You must be signed in to change notification settings - Fork 222
Description
This refers to closed #275
Sorry for ME being the bearer of bad news, but this is still no longer working.
My setup:
artifactory as private registry, requests have to be authorized.
nodejs 22.18.0
corepack 0.34.0
Authentication is setup using env variables:
COREPACK_NPM_REGISTRY=https://some.host/artifactory/api/npm/registry
COREPACK_NPM_TOKEN=<token>
When I do:
corepack install pnpm@latest -g
There happen to be 3 requests, the third is unauthorized:
https://some.host/artifactory/api/npm/registry/pnpm
https://some.host/artifactory/api/npm/registry/pnpm/10.14.0
https://some.host/artifactory/api/npm/registry/
One reason might be
Line 32 in 0b492c9
if (input.origin === (process.env.COREPACK_NPM_REGISTRY || DEFAULT_NPM_REGISTRY_URL) && process.env.COREPACK_NPM_TOKEN) { |
which is incorrect in my view, because input.origin
happens to be https://some.host
without a path, so this expression can never be true.
But even then - the 3rd request is crap anyway, it should be something like that, but it isn't:
https://some.host/artifactory/api/npm/registry/pnpm/-/pnpm-10.14.0.tgz
Why?
This seems to be related to #725