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

Allow passing configuration via environment variables #5044

Closed
icholy opened this issue Dec 8, 2023 · 2 comments
Closed

Allow passing configuration via environment variables #5044

icholy opened this issue Dec 8, 2023 · 2 comments
Labels
duplicate been there, done that, got the t-shirt... type: feature enhancement proposal

Comments

@icholy
Copy link
Contributor

icholy commented Dec 8, 2023

Is your feature request related to a problem or a nice-to-have?? Please describe.

I have a launch config in neovim which runs npm test. I'd like a mechanism to pass --inspect-brk to mocha. Setting NODE_OPTIONS=--inspect-brk isn't an option because it affects all tools that are executed by the test script.

Describe the solution you'd like

A MOCHA_OPTIONS environment variable variable similar to NODE_OPTIONS.

Describe alternatives you've considered

Yargs has support for env variables: https://yargs.js.org/docs/#api-reference-envprefix
However, using this feature would result in a separate env variable for each option:

Ex:

  • MOCHA_BAIL
  • MOCHA_ALLOW_UNCAUGHT
  • MOCHA_FAIL_ZERO
  • etc ...
@icholy icholy added the type: feature enhancement proposal label Dec 8, 2023
@icholy
Copy link
Contributor Author

icholy commented Dec 8, 2023

PR #4835

@JoshuaKGoldberg
Copy link
Member

Duplicate of #4330.

@JoshuaKGoldberg JoshuaKGoldberg closed this as not planned Won't fix, can't repro, duplicate, stale Dec 27, 2023
@JoshuaKGoldberg JoshuaKGoldberg added the duplicate been there, done that, got the t-shirt... label Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate been there, done that, got the t-shirt... type: feature enhancement proposal
Projects
None yet
Development

No branches or pull requests

2 participants