Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PluginManager would abort loading plugins when encountering an error #3017

Merged
merged 1 commit into from
Nov 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/pluginManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ export interface PackageJSON { // incomplete type for package.json (just stuff w

main?: string;
/**
* When set as module, it marks .js file to be treated as ESM.
* When set as module, it marks .js file to be treated as ESM.
* See https://nodejs.org/dist/latest-v14.x/docs/api/esm.html#esm_enabling
*/
type?: "module" | "commonjs";
type?: "module" | "commonjs";

engines?: Record<string, string>;
dependencies?: Record<string, string>;
Expand Down Expand Up @@ -136,7 +136,7 @@ export class PluginManager {
log.error("====================");

this.plugins.delete(identifier);
return;
continue;
}

if (this.disabledPlugins && this.disabledPlugins.includes(plugin.getPluginIdentifier())) {
Expand Down Expand Up @@ -228,7 +228,7 @@ export class PluginManager {
if (found.length !== 1) {
throw new Error(`The requested accessory '${accessoryIdentifier}' has been registered multiple times. Please be more specific by writing one of: ${options}`);
}
}
}

plugin = found[0];
accessoryIdentifier = plugin.getPluginIdentifier() + "." + accessoryIdentifier;
Expand Down