diff --git a/index.js b/index.js index b6b6430..d2bc37e 100644 --- a/index.js +++ b/index.js @@ -96,7 +96,7 @@ function licensee (configuration, path, callback) { outputError = error }) child.once('close', function (code) { - if (code !== 0) { + if (!configuration.disableLsErrorAborting && code !== 0) { done(new Error('npm exited with status ' + code)) } else if (outputError) { done(outputError) diff --git a/licensee b/licensee index 2c6f03d..d096ba0 100755 --- a/licensee +++ b/licensee @@ -20,6 +20,7 @@ var USAGE = [ ' --osi Permit licenses approved by the Open Source Initiative.', ' --packages LIST Permit comma-delimited name@range.', ' --errors-only Only show NOT APPROVED packages.', + ' --disable-ls-error-aborting Disables aborting upon `npm ls` errors (as may occur due to missing peerDeps)', ' --production Do not check devDependencies.', ' --ndjson Print newline-delimited JSON objects.', ' --quiet Quiet mode, only exit(0/1).', @@ -117,6 +118,7 @@ if (options['--init']) { function checkDependencies () { configuration.productionOnly = options['--production'] configuration.corrections = configuration.corrections || options['--corrections'] + configuration.disableLsErrorAborting = options['--disable-ls-error-aborting'] require('./')(configuration, cwd, function (error, dependencies) { if (error) { die(error.message + '\n')