When the COREPACK_NPM_REGISTRY environment variable is set, the tarball mirror URL is always used instead of the one set in COREPACK_NPM_REGISTRY.
This is likely because the URL in line 243 of installVersion is overwritten with the tarball address, but the replace function in line 249 still replaces it with DEFAULT_NPM_REGISTRY_URL.