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

This commit is contained in:
psychobunny
2015-06-02 17:35:41 -04:00
parent e74f3da89e
commit 9704af3b6d

View File

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