Skip to main content

Type Alias: VerifyUpdateFile

VerifyUpdateFile = (params) => Promise<VerifyUpdateFileResult>

Custom verification of an update file, run before the file is allowed to become installable.

It is invoked on every path that can lead to an install:

  • right after a fresh download, while the file still sits under a temporary name (see updateFilePath);
  • when an update downloaded by an earlier session is reused from the updater cache;
  • before an install-on-next-launch spawns the cached installer.

Parameters​

params​

cancellationToken?​

CancellationToken

The cancellation token of the download this verification belongs to. Not set when a cached or pending update is re-verified outside a download.

originalUpdateFileName​

string

The real file name of the update, i.e. the name updateFilePath has (or will be given once verified).

packageFilePath?​

string

Path to the downloaded NSIS web installer package (package-<version>.7z). Only set for web installers.

updateFilePath​

string

Absolute path to the update file to verify. For a fresh download this is a temporary path — the file is renamed to originalUpdateFileName only after this verification succeeds, so it can never be executed under its real name while unverified. When a cached or pending update is re-verified the file already sits under its real name.

Returns​

Promise<VerifyUpdateFileResult>