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