Conversation
8088193 to
0e2c5c9
Compare
There was a problem hiding this comment.
Pull request overview
This PR fixes an inconsistency in how the mirror-token is used across the codebase. Previously, the token was hardcoded with a "Bearer" prefix in one location (getNodeJsVersions method) but used as-is in all other locations (downloadTool calls). This inconsistency made the mirror feature unusable because users had to choose between making one call work or the others. The fix removes the hardcoded "Bearer" prefix, requiring users to explicitly include the authentication scheme in their token if needed.
Changes:
- Removed hardcoded "Bearer" prefix from Authorization header in
getNodeJsVersionsmethod - Updated compiled distribution file to reflect source changes
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/distributions/base-distribution.ts | Removes "Bearer" prefix from Authorization header to make token usage consistent |
| dist/setup/index.js | Compiled distribution reflecting the source change |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hi @aparnajyothi-y, @priyagupta108 can you please take a look |
|
friendly ping |
Followup of #1240
Description:
This change makes the mirror usable.
Right now Immagine we setup the value of
mirror-tokentofoo.In this line the value is used as
setup-node/src/distributions/base-distribution.ts
Line 106 in 2951748
Bearer foobut in other places such as:setup-node/src/distributions/base-distribution.ts
Line 149 in 2951748
setup-node/src/distributions/base-distribution.ts
Line 210 in 2951748
its used as is.
But if we change the value to
Bearer foo,setup-node/src/distributions/base-distribution.ts
Line 106 in 2951748
here it becomes
Bearer Bearer foowhich is incorrect, but works everywhere else.So this PR makes it that if its a
Bearer, the user needs to be explicit.Related issue:
Add link to the related issue.
Check list: