Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | 13x 13x 13x 13x 13x 13x 13x 1x 1x | const usageMessage = require('./usageMessage'); module.exports = function exitProcessOrWarnIfNeeded({ unknownArgs, parsedArgs, hasFailingArg }) { Iif (unknownArgs.length) { console.error(`license-checker-rseidelsohn@${require('../package.json').version}`, '\n'); console.error( `Error: Unknown option${unknownArgs.length > 1 ? 's' : ''}: ${unknownArgs .map((unknownArg) => `'${unknownArg}'`) .join(', ')}`, ); console.error(` Possibly a typo? Currently known options are:`); console.error(usageMessage, '\n'); process.exit(1); } Iif (parsedArgs.help) { console.error(`license-checker-rseidelsohn@${require('../package.json').version}`); console.error(usageMessage, '\n'); process.exit(0); } Iif (parsedArgs.version) { console.error(require('../package.json').version); process.exit(1); } Iif (parsedArgs.failOn && parsedArgs.onlyAllow) { console.error('Error: --failOn and --onlyAllow can not be used at the same time. Choose one or the other.'); process.exit(1); } if (hasFailingArg && hasFailingArg.indexOf(',') >= 0) { const argName = parsedArgs.failOn ? 'failOn' : 'onlyAllow'; console.warn( `Warning: The --${argName} argument takes semicolons as delimeters instead of commas (some license names can contain commas)`, ); } }; |