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

feat: nyc no longer tries to run arguments passed to the instrumented bin #322

Merged
merged 2 commits into from
Jul 24, 2016

Conversation

bcoe
Copy link
Member

@bcoe bcoe commented Jul 17, 2016

This pull request is an attempt to make nyc's argument parsing more clever, in the past:

nyc npm test --silent

would have resulted in nyc itself reading the --silent flag, and failing to print output.

With this fix, nyc instead parses:

nyc npm test, dropping the trailing arguments.

fixes: #99, #201

Reviewers: @MoOx, @jamestalmage, @danez, @JaKXz

var args = JSON.parse(stdout)
args.should.include('--help')
args.should.include('--version')
args.should.not.include('--silent')
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@MoOx
Copy link

MoOx commented Jul 18, 2016

Nice work! Thank you for this!

@bcoe bcoe merged commit e0a8c0b into master Jul 24, 2016
@bcoe bcoe deleted the better-arg-parsing branch July 24, 2016 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use -- to prevent nyc from processing further args.
2 participants