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

npmrc environment variable fallback #6018

Closed
1 task
rburgst opened this issue Feb 1, 2023 · 2 comments · Fixed by pnpm/components#10 or #6358
Closed
1 task

npmrc environment variable fallback #6018

rburgst opened this issue Feb 1, 2023 · 2 comments · Fixed by pnpm/components#10 or #6358
Milestone

Comments

@rburgst
Copy link

rburgst commented Feb 1, 2023

Describe the user story

As a devops engineer I would like to be able to use fallback values for environment variables similar to what yarn berry allows.

Describe the solution you'd like

in yarn this works as follows in .yarnrc.yml

  scope:
    npmAlwaysAuth: true
    npmAuthIdent: "${AUTH_IDENT:-fallback_value}"

so in .npmrc it would be nice to use the same syntax

@scope:registry=https://registry.server/npm/scope/
//registry.server/npm/scope/:_authToken=${AUTH_IDENT:-fallback_value}

Describe the drawbacks of your solution

Cant think of any drawbacks, really.

Describe alternatives you've considered

Otherwise you would need to dynamically create the .npmrc file in your GH actions, which is a hassle.

@zkochan
Copy link
Member

zkochan commented Feb 2, 2023

I don't have objections.

@rburgst
Copy link
Author

rburgst commented Apr 4, 2023

@zkochan can we get the PR pnpm/components#10 in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants