Skip to content

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

Merged
bcoe merged 2 commits into
masterfrom
better-arg-parsing
Jul 24, 2016
Merged

feat: nyc no longer tries to run arguments passed to the instrumented bin#322
bcoe merged 2 commits into
masterfrom
better-arg-parsing

Conversation

@bcoe

@bcoe bcoe commented Jul 17, 2016

Copy link
Copy Markdown
Member

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

Comment thread test/src/nyc-bin.js
var args = JSON.parse(stdout)
args.should.include('--help')
args.should.include('--version')
args.should.not.include('--silent')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

lgtm!

@MoOx

MoOx commented Jul 18, 2016

Copy link
Copy Markdown

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