some plugins may not have a library, no need to warn unless unable to parse

v1.18.x
psychobunny 10 years ago
parent e74f3da89e
commit 9704af3b6d

@ -71,13 +71,8 @@ module.exports = function(Plugins) {
} }
function registerHooks(pluginData, pluginPath, callback) { function registerHooks(pluginData, pluginPath, callback) {
function libraryNotFound() {
winston.warn('[plugins.reload] Library not found for plugin: ' + pluginData.id);
callback();
}
if (!pluginData.library) { if (!pluginData.library) {
return libraryNotFound(); return callback();
} }
var libraryPath = path.join(pluginPath, pluginData.library); var libraryPath = path.join(pluginPath, pluginData.library);
@ -96,7 +91,8 @@ module.exports = function(Plugins) {
} }
} catch(err) { } catch(err) {
winston.error(err.stack); winston.error(err.stack);
libraryNotFound(); winston.warn('[plugins] Unable to parse library for: ' + pluginData.id);
callback();
} }
} }

Loading…
Cancel
Save