mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-08 05:31:55 +00:00
Added pluginPath based on npm
This commit is contained in:
@@ -119,9 +119,10 @@ Plugin.getDefaultPaths = function() {
|
|||||||
} else {
|
} else {
|
||||||
paths.push('/usr/local/lib/node_modules');
|
paths.push('/usr/local/lib/node_modules');
|
||||||
paths.push('/usr/lib/node_modules');
|
paths.push('/usr/lib/node_modules');
|
||||||
|
const exec = require('child_process').execSync
|
||||||
|
paths.push(exec('/bin/echo -n "$(npm -g prefix)/lib/node_modules"').toString('utf8'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return paths;
|
return paths;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user