fix: register failed community plugins as disabled instead of enabled
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e560f3a5c8
commit
a048dd637d
@ -150,12 +150,13 @@ export async function runSetup(
|
||||
settingsPath: settingsManager.getSettingsPath(plugin?.name ?? npmPackage),
|
||||
description: plugin?.description ?? installedPkg.description,
|
||||
});
|
||||
} catch {
|
||||
// Plugin installed via npm but failed to load — still register
|
||||
} catch (err) {
|
||||
// Plugin installed via npm but failed to load — register as disabled
|
||||
console.log(fail(`Failed to load ${npmPackage}: ${(err as Error).message}`));
|
||||
pluginRegistry.register(npmPackage, {
|
||||
version: 'unknown',
|
||||
source: 'npm',
|
||||
enabled: true,
|
||||
enabled: false,
|
||||
settingsPath: settingsManager.getSettingsPath(npmPackage),
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user