0
Fork 0
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:
Juan Picado @jotadeveloper 2017-06-30 23:09:59 +02:00
parent 1926522f99
commit 582285a37f
No known key found for this signature in database
GPG key ID: 18AC54485952D158

View file

@ -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);
});