Kuberwastaken/claurst · error

Unsupported OS for upgrade

Error message

Unsupported OS for upgrade

What it means

Target-detection guard in the upgrade path: the binary was built for an OS other than linux, macOS, or windows (cfg!(target_os) matched none), so no release asset naming scheme exists for it. The platform itself is unsupported by self-upgrade, not a runtime failure.

Solutions

  1. Upgrade manually: download the release for your platform from the GitHub releases page
  2. Reinstall via the original installation method (npm, cargo install, package manager)
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src-rust/crates/cli/src/upgrade.rs:156 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Kuberwastaken/claurst@b0637c97ec (2026-09-10). Data as JSON: /api/errors/a0ad8a1fa2ee76a6. Report an issue: GitHub.

Appendix: source

Thrown at src-rust/crates/cli/src/upgrade.rs:156

           -h, --help          Show this help\n\n\
         Downloads the latest claurst release from GitHub and replaces this\n\
         binary in place. Your settings and sessions are preserved."
    );
}

// ---------------------------------------------------------------------------
// Target detection
// ---------------------------------------------------------------------------

fn detect_target() -> Result<String> {
    let os = if cfg!(target_os = "linux") {
        "linux"
    } else if cfg!(target_os = "macos") {
        "macos"
    } else if cfg!(target_os = "windows") {
        "windows"
    } else {
        bail!("Unsupported OS for upgrade");
    };

    let arch = if cfg!(target_arch = "x86_64") {
        "x86_64"
    } else if cfg!(target_arch = "aarch64") {
        "aarch64"
    } else {
        bail!("Unsupported architecture for upgrade");
    };

    Ok(format!("{}-{}", os, arch))
}

fn archive_name_for_target(target: &str) -> (String, bool) {
    if target.starts_with("windows") {
        (format!("{}-{}.zip", APP, target), true)
    } else {
        (format!("{}-{}.tar.gz", APP, target), false)

View on GitHub (pinned to b0637c97ec)