Skip to main content

Module self_update

Module self_update 

Source
Expand description

Self-update for the water binary itself.

water reaches machines through four channels — the dist-generated shell and PowerShell installers, the Homebrew tap, cargo install / cargo binstall, and everything else — and only the first owns an update path this binary may take itself: a dist install receipt says the release’s own installer put the binary where it is, so re-running the newest release’s installer (which axoupdater drives) is safe. Every other channel belongs to a package manager whose files must not be rewritten underneath it, so InstallSource resolves which channel owns the running executable before anything is downloaded, and update / check act on the answer.

The passive check is a separate surface: passive_update_notice runs at most once per [PASSIVE_CHECK_INTERVAL], records the attempt in the CLI’s own state directory (~/.water/config.toml), and is silent on failure.

Enums§

CheckOutcome
What water update --check reports.
InstallSource
The install channel the running water binary came through — the four rows the update path distinguishes before touching anything.
UpdateOutcome
What a completed water update leaves behind.

Functions§

check
water update --check: report the newest release without installing it.
cli_update_command
The update command the minimum-cli-version rejection names.
passive_update_notice
The passive version check behind every non-hot-path command.
update
water update: self-update in place when a dist receipt owns the binary; name the owning package manager’s command for every other channel and change nothing.