shorter error message

v1.18.x
Barış Soner Uşaklı 6 years ago
parent 69253d9a7f
commit a2aae7f805

@ -44,7 +44,7 @@ module.require = function () {
// if we can't find the module try in parent directory
// since plugins.js moved into plugins folder
if (err.code === 'MODULE_NOT_FOUND') {
winston.warn('[plugins/require] please update module.parent.require("' + arguments[0] + '") in your plugin!\n' + err.stack.split('\n').slice(0, 6).join('\n'));
winston.warn('[plugins/require] please update module.parent.require("' + arguments[0] + '") in your plugin!\n' + err.stack.split('\n')[5]);
return defaultRequire.apply(module, [path.join('../', arguments[0])]);
}
throw err;

Loading…
Cancel
Save