{"record":{"id":"7ca3c852f3987167","repo":"gitbutlerapp/gitbutler","slug":"unsupported-os-or-architecture-os-arch","errorCode":null,"errorMessage":"unsupported OS or architecture: {os} {arch}","messagePattern":"unsupported OS or architecture: (.+?) (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/but-installer/src/config.rs","lineNumber":160,"sourceCode":"        let version_request = VersionRequest::from_string(version_string)?;\n        Self::new_with_version(version_request)\n    }\n\n    /// Create a new installer config with an explicit version request\n    pub(crate) fn new_with_version(version_request: VersionRequest) -> Result<Self> {\n        let home_dir =\n            dirs::home_dir().ok_or_else(|| anyhow!(\"Failed to determine home directory\"))?;\n\n        // Detect platform\n        let os = env::consts::OS;\n        let arch = env::consts::ARCH;\n\n        let platform = match (os, arch) {\n            (\"macos\", \"aarch64\") => \"darwin-aarch64\",\n            (\"macos\", \"x86_64\") => \"darwin-x86_64\",\n            (\"linux\", \"aarch64\") => \"linux-aarch64\",\n            (\"linux\", \"x86_64\") => \"linux-x86_64\",\n            (os, arch) => bail!(\"unsupported OS or architecture: {os} {arch}\"),\n        };\n\n        Ok(Self {\n            version_request,\n            home_dir,\n            platform: platform.to_string(),\n        })\n    }\n\n    pub fn releases_url(&self) -> String {\n        match &self.version_request {\n            VersionRequest::Nightly => \"https://app.gitbutler.com/releases/nightly\".to_string(),\n            VersionRequest::Specific(version) => {\n                format!(\n                    \"https://app.gitbutler.com/releases/version/{}\",\n                    version.as_str()\n                )\n            }","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/caf1f223d3cfb94488c9198ad34487c6006c648f/crates/but-installer/src/config.rs#L142-L178","documentation":"InstallerConfig::new_with_version() maps (std::env::consts::OS, std::env::consts::ARCH) onto a release platform key (darwin-aarch64, darwin-x86_64, linux-aarch64, linux-x86_64). The bail fires when the compiled target is anything else, because the GitButler releases API has no artifact key for it. The crate is additionally gated with #![cfg(unix)], so Windows builds fail before this point.","triggerScenarios":"Running the installer binary on an unsupported target: windows/*, linux armv7 (32-bit ARM boards like older Raspberry Pis), riscv64, freebsd, netbsd, or any architecture other than x86_64/aarch64 on macOS or Linux.","commonSituations":"Trying to install on a Raspberry Pi with 32-bit Raspberry Pi OS; BSD systems; assuming a Windows build exists because the desktop app has one; cross-compiling the crate to an exotic target.","solutions":["Run the installer on a supported target: macOS or Linux on x86_64 or aarch64","On unsupported hardware, build the but CLI from source with cargo instead of using the installer","On Windows, use the GitButler desktop installer or install inside WSL (linux-x86_64)"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let supported = matches!(\n    (std::env::consts::OS, std::env::consts::ARCH),\n    (\"macos\" | \"linux\", \"x86_64\" | \"aarch64\")\n);\nif !supported {\n    eprintln!(\n        \"but-installer supports macOS/Linux on x86_64/aarch64, not {} {}\",\n        std::env::consts::OS,\n        std::env::consts::ARCH\n    );\n    std::process::exit(1);\n}\nbut_installer::run_installation_with_version(request, interactive)?;","typeGuard":"const fn is_supported_platform(os: &str, arch: &str) -> bool {\n    matches!((os, arch),\n        (\"macos\", \"aarch64\") | (\"macos\", \"x86_64\") |\n        (\"linux\", \"aarch64\") | (\"linux\", \"x86_64\"))\n}","tryCatchPattern":"match but_installer::run_installation_with_version(request, false) {\n    Err(e) if e.to_string().starts_with(\"unsupported OS or architecture\") => {\n        // route to a source build or the platform-appropriate installer\n        fallback_install_path()?;\n    }\n    result => result,\n}","preventionTips":["Check std::env::consts::OS/ARCH before invoking the installer","Gate installer automation steps on supported platform triples in CI","Offer a source-build fallback for unsupported targets"],"tags":["rust","platform","architecture","installer","but-installer"],"backgroundTag":"unsupported-platform","analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}