Skip to main content

cmd_update

Function cmd_update 

Source
pub fn cmd_update(
    version: Option<&str>,
    dir: Option<&Path>,
    dry_run: bool,
) -> Result<()>
Expand description

scc update [--version V] [--dir D] [--dry-run] — self-update the binary through the same installer docs/INSTALL.md documents (scripts/install.sh): checksum-verified download from the GitHub release assets, then the binary’s own smoke test.

The installer is fetched from the local release when SCC_DOWNLOAD_BASE points at one (the contract test does this); otherwise it comes from the published release path. This keeps scc update and the documented install in agreement — one mechanism, not two.

Default install dir is the directory holding the running binary (so a ~/.local/bin/scc updates in place); --dir overrides it.