Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,14 @@ class PluginManager private constructor(

logger.debug("Parsed manifest for plugin: ${manifest.name} (${manifest.id})")

// Installing any plugin reloads the whole directory. A second instance would activate
// beside the running one, which is never deactivated: a service it publishes replaces the
// running instance's, and plugins registered with the old one are not told to move.
loadedPlugins[manifest.id]?.let { running ->
Comment thread
davidschachterADFA marked this conversation as resolved.
Resolved
logger.debug("Plugin already loaded, keeping the running instance: ${manifest.id}")
return Result.success(running.plugin)
}

if (!securityManager.validatePlugin(file, manifest)) {
return Result.failure(SecurityException("plugin failed security validation: ${manifest.id}"))
}
Expand Down
Loading