mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-08 05:31:55 +00:00
Provide and output proper existing error message
If the found plugin / package does not fulfill some specs (i.e. does not contain the keyword `homebridge-plugin`), it will be rejected with an error. Without that change nobody will be notified WHY the plugin has been rejected/skipped.
This commit is contained in:
@@ -176,6 +176,10 @@ Plugin.installed = function() {
|
||||
pjson = Plugin.loadPackageJSON(pluginPath);
|
||||
}
|
||||
catch (err) {
|
||||
if (name.substring(0,11) === 'homebridge-') {
|
||||
// show warning only if module starts with prefix
|
||||
log.warn("Warning: skipping plugin found at '" + pluginPath + "' because of: " + err.message);
|
||||
}
|
||||
// swallow error and skip this module
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user