mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-02-17 23:45:29 -05:00
(cli): encouraging to use lodash
This commit is contained in:
parent
1926522f99
commit
582285a37f
1 changed files with 9 additions and 3 deletions
12
lib/cli.js
12
lib/cli.js
|
@ -4,6 +4,8 @@
|
|||
/* eslint no-empty:0 */
|
||||
'use strict';
|
||||
|
||||
const _ = require('lodash');
|
||||
|
||||
if (process.getuid && process.getuid() === 0) {
|
||||
global.console.error('Verdaccio doesn\'t need superuser privileges. Don\'t run it under root.');
|
||||
}
|
||||
|
@ -182,13 +184,17 @@ function afterConfigLoad() {
|
|||
});
|
||||
|
||||
// undocumented stuff for tests
|
||||
if (typeof(process.send) === 'function') {
|
||||
process.send({verdaccio_started: true});
|
||||
if (_.isFunction(process.send)) {
|
||||
process.send({
|
||||
verdaccio_started: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
process.on('uncaughtException', function(err) {
|
||||
logger.logger.fatal( {err: err},
|
||||
logger.logger.fatal( {
|
||||
err: err,
|
||||
},
|
||||
'uncaught exception, please report this\n@{err.stack}' );
|
||||
process.exit(255);
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue