Merge pull request #52 from samuelthomas2774/check-plugin-directory
Make sure plugins are directories
This commit is contained in:
commit
28c573e5c5
|
@ -142,6 +142,9 @@ class PluginManager extends Module {
|
|||
try {
|
||||
pluginPath = path.join(this.pluginsPath, pluginPath);
|
||||
|
||||
// Make sure this is a directory
|
||||
await FileUtils.directoryExists(pluginPath);
|
||||
|
||||
if (!reload) {
|
||||
const loaded = plugins.find(plugin => plugin.pluginPath === pluginPath);
|
||||
if (loaded) {
|
||||
|
@ -269,4 +272,4 @@ async function pluginManager(pluginName) {
|
|||
if (window.bdTests) window.bdTests.pluginManager = pluginManager;
|
||||
else window.bdTests = { pluginManager };
|
||||
|
||||
module.exports = { PluginManager: _instance, Plugin }
|
||||
module.exports = { PluginManager: _instance, Plugin };
|
||||
|
|
|
@ -222,4 +222,4 @@ class Filters {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = { Logger, Utils, FileUtils, Filters }
|
||||
module.exports = { Logger, Utils, FileUtils, Filters };
|
||||
|
|
Loading…
Reference in New Issue