Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup node produces incorrect .npmrc file #995

Open
aqeelat opened this issue Apr 3, 2024 · 1 comment
Open

Setup node produces incorrect .npmrc file #995

aqeelat opened this issue Apr 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@aqeelat
Copy link

aqeelat commented Apr 3, 2024

Description:
The .npmrc file created by the action does not match what is specified in https://docs.npmjs.com/cli/v10/configuring-npm/npmrc/
Primarily, it copies the exact registry-url without stripping the protocol when creating the auth parameter.

For example:

- uses: actions/setup-node@v4
  env:
    NODE_AUTH_TOKEN: "MyAuthToken"
  with:
    registry-url: 'https://my-repo.example.com/npm-private/'
    scope: 'myscope'

Results in:

https://my-repo.example.com/npm-private/:_authToken=${NODE_AUTH_TOKEN}
@myscope:registry=https://my-repo.example.com/npm-private/

Instead of

//my-repo.example.com/npm-private/:_authToken=${NODE_AUTH_TOKEN}
@myscope:registry=https://my-repo.example.com/npm-private/

Action version:
v4

@aqeelat aqeelat added bug Something isn't working needs triage labels Apr 3, 2024
@aparnajyothi-y
Copy link
Contributor

Hello @aqeelat, Thank you for creating this issue and we will look into it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants