mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-08 05:31:55 +00:00
Improve error handling.
This commit is contained in:
@@ -165,9 +165,13 @@ Plugin.installed = function() {
|
|||||||
|
|
||||||
// reconstruct full path
|
// reconstruct full path
|
||||||
var pluginPath = path.join(requirePath, name);
|
var pluginPath = path.join(requirePath, name);
|
||||||
|
|
||||||
// we only care about directories
|
try {
|
||||||
if (!fs.statSync(pluginPath).isDirectory()) continue;
|
// we only care about directories
|
||||||
|
if (!fs.statSync(pluginPath).isDirectory()) continue;
|
||||||
|
} catch (e) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// does this module contain a package.json?
|
// does this module contain a package.json?
|
||||||
var pjson;
|
var pjson;
|
||||||
|
|||||||
Reference in New Issue
Block a user