Skip to main content

Module self_update

Module self_update 

Source
Expand description

decdn self-update: replace the running binary with the latest signed release, and the once-a-day notice that a newer one exists.

The order is deliberate: ownership first, offline, so a binary this command may not replace costs no download; then the latest tag; then the signed manifest, which must verify against an embedded minisign key before anything else is trusted; then the archive, checked against the manifest and unpacked; and only then the swap, staged beside the running binary and renamed over it.

Structs§

NudgePolicy
What the finished command tells the notice about itself. Either field true suppresses the notice.
Pending
A lookup in flight, started before the command ran.

Functions§

self_update
Run decdn self-update.
start_nudge
Start the daily check for a command about to run, when one is due and the command’s output is a terminal. Returns the lookup to settle once the command has finished, or None when no check runs.