Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion sources/httpUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ async function fetch(input: string | URL, init?: RequestInit) {
input.username = input.password = ``;
}

if (input.origin === (process.env.COREPACK_NPM_REGISTRY || DEFAULT_NPM_REGISTRY_URL) && process.env.COREPACK_NPM_TOKEN) {
const registry = new URL(process.env.COREPACK_NPM_REGISTRY || DEFAULT_NPM_REGISTRY_URL);

if (input.origin === registry.origin && process.env.COREPACK_NPM_TOKEN) {
Comment thread
victor-perez marked this conversation as resolved.
Outdated
headers = {
...headers,
authorization: `Bearer ${process.env.COREPACK_NPM_TOKEN}`,
Expand Down
Loading