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

Ensure --verbose flag is passed through to rc options #111

Merged
merged 1 commit into from
Nov 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var libc = env.LIBC || (detectLibc.isNonGlibcLinux && detectLibc.family) || ''

// Get `prebuild-install` arguments that were passed to the `npm` command
if (env.npm_config_argv) {
var npmargs = ['prebuild', 'compile', 'build-from-source', 'debug']
var npmargs = ['prebuild', 'compile', 'build-from-source', 'debug', 'verbose']
try {
var npmArgv = JSON.parse(env.npm_config_argv).cooked
for (var i = 0; i < npmargs.length; ++i) {
Expand Down
4 changes: 3 additions & 1 deletion test/rc-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,16 @@ test('npm args are passed on from npm environment into rc', function (t) {
'--build-from-source',
'--download',
'https://foo.bar',
'--debug'
'--debug',
'--verbose'
]
})
}
runRc(t, '', env, function (rc) {
t.equal(rc['build-from-source'], true, '--build-from-source works')
t.equal(rc.compile, true, 'compile should be true')
t.equal(rc.debug, true, 'debug should be true')
t.equal(rc.verbose, true, 'verbose should be true')
t.equal(rc.download, 'https://foo.bar', 'download is set')
t.end()
})
Expand Down