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

More environment variables that override config #158

Open
3 tasks done
FossPrime opened this issue Jun 7, 2023 · 2 comments
Open
3 tasks done

More environment variables that override config #158

FossPrime opened this issue Jun 7, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@FossPrime
Copy link

Clear and concise description of the problem

NI_CONFIG_FILE is not enough as it requires a config file to be made, which involves writing a scripts and doing file operations.

Suggested solution

Package.json would work fine aswell

{
  "ni": "pnpm" // Global agent doesnt ever make sense in a package.json
}

Alternative

NI_CONFIG_FILE
NI_DEFAULT
NI_GLOBAL

Additional context

Stackblitz supports both setting env vars in a config file... or even through package.json

https://stackblitz.com/edit/vitejs-vite-eya5pj?file=package.json

Validations

@FossPrime FossPrime added the enhancement New feature or request label Jun 7, 2023
@a1mersnow
Copy link
Contributor

a1mersnow commented Nov 20, 2023

There are only two config properties now: globalAgent and defaultAgent.

Like what you said, globalAgent doesn't make sense in a package.json.

While in a project, there are two cases:

  • with lock file, then we can automatically detect the agent
  • without lock file, we will be prompted for the agent

Both cases are well handled by today's codebase, so I couldn't see any benefit from your suggestion.

And, we already have packageManager field in package.json...

@ghostdevv
Copy link

I would also like this feature, so that I can configure the env var in my main dotfiles rather than having to add another file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants