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

Expand .nycrc to process.argv #660

Closed
jdalton opened this issue Sep 4, 2017 · 7 comments
Closed

Expand .nycrc to process.argv #660

jdalton opened this issue Sep 4, 2017 · 7 comments

Comments

@jdalton
Copy link

jdalton commented Sep 4, 2017

I noticed mocha will expand its mocha.opts into process.argv args.
This allows scripts that were --require'd to detect themselves.

Would nyc be open to expanding its config into process.argv args too?

If it's something you all would dig, I'm up for creating a PR.

@bcoe
Copy link
Member

bcoe commented Sep 4, 2017

@jdalton I really like this idea, I think we'd just need to be smart and figure out how to make it play nice with features like this:

#620

We allow folks to override a few parameters like cwd, but we then assume that a spawned subprocess won't have these parameters overridden ... cwd might be the only edge-case.

@jdalton
Copy link
Author

jdalton commented Sep 7, 2017

Ah nice! To start nyc could transfer to process.argv the ones it probably won't have problems with then expand as guards or code to handle others is added.

@bcoe
Copy link
Member

bcoe commented Sep 7, 2017

@jdalton that's not a bad idea, maybe just black-list cwd for starters?

@jdalton
Copy link
Author

jdalton commented Sep 7, 2017

👌 , I'll work on a PR

Related to yargs/yargs#503 and moxystudio/yargs-unparser

@bcoe bcoe added the triaged label Sep 16, 2017
@Rush
Copy link

Rush commented Nov 4, 2017

Maybe related? #709

@stale stale bot added the wontfix label Jan 6, 2019
@JaKXz
Copy link
Member

JaKXz commented Jan 23, 2019

Is this still a valid issue? Is it within the scope of nyc or does it belong in an underlying package (yargs)?

@istanbuljs istanbuljs deleted a comment from stale bot Jan 23, 2019
@coreyfarrell
Copy link
Member

I'd be interested in seeing an example of a module that would use this information from process.argv but I'm leaning towards calling this out of scope for NYC, I don't think we should mess with process.argv.

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

No branches or pull requests

5 participants