Merge pull request #387 from knalli/patch-1

Provide and output proper existing error message
This commit is contained in:
Nick Farina
2015-11-11 15:15:35 -08:00

View File

@@ -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;
}