mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 15:05:46 +01:00
some plugins may not have a library, no need to warn unless unable to parse
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user