Skip to content

updatePlugin

Updates another, installed plugin to its latest release, reporting the outcome as a notice.

The update path for a plugin that is enabled but too old for the one asking: installing or enabling it again does nothing, so installAndEnablePlugin cannot help there. A plugin already at its latest release is reported as such, naming the requesting plugin, because then no click can satisfy it and the user deserves to know that rather than watch the button do nothing.

Import:

import { updatePlugin } from '@mnaoumov/obsidian-lib/plugin/plugin-install-state';

Signature:

function updatePlugin(params: UpdatePluginParams): Promise<void>

Parameters:

Parameter Type Description
params UpdatePluginParams The UpdatePluginParams.

Returns: Promise<void> — A Promise that resolves once the update has run.


Links to this page: