{"record":{"id":"2b3c01c67bb21423","repo":"jdx/mise","slug":"bootstrap-system-services-are-only-supported-on-li","errorCode":null,"errorMessage":"bootstrap system services are only supported on Linux","messagePattern":"bootstrap system services are only supported on Linux","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/services_non_linux.rs","lineNumber":51,"sourceCode":") -> Vec<ResourcePlan> {\n    vec![]\n}\n\npub(crate) fn apply(_requests: &[ServiceRequest], _dry_run: bool, _yes: bool) -> Result<()> {\n    Ok(())\n}\n\npub(crate) fn apply_with_notifications(\n    _requests: &[ServiceRequest],\n    _notifications: &ServiceNotifications,\n    _dry_run: bool,\n    _yes: bool,\n) -> Result<()> {\n    Ok(())\n}\n\npub(crate) fn apply_privileged_plan_from_stdin() -> Result<()> {\n    bail!(\"bootstrap system services are only supported on Linux\")\n}\n\nfn reject_configured(config: &Config) -> Result<Vec<ServiceRequest>> {\n    // validated like on Linux first, so a forgotten `scope = \"user\"` is\n    // reported as such rather than as a platform limitation\n    let configured = !compose_system_declarations(config)?.is_empty();\n    if configured {\n        bail!(\"bootstrap system services are only supported on Linux\");\n    }\n    Ok(vec![])\n}\n","sourceCodeStart":33,"sourceCodeEnd":63,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/services_non_linux.rs#L33-L63","documentation":"The privileged apply entry point for bootstrap system services is only implemented on Linux. On macOS, Windows, or other non-Linux platforms the function unconditionally fails, because systemd is not available there.","triggerScenarios":"Calling `apply_privileged_plan_from_stdin` (the `mise run bootstrap --apply-privileged` style path) on a non-Linux platform.","commonSituations":"Running the same mise task script on a macOS developer machine; CI matrix jobs that include non-Linux runners executing bootstrap-service commands; porting configs between Linux servers and Mac laptops.","solutions":["Run this command on a Linux host with systemd","Gate the bootstrap-service step behind an OS check in your task script","Use `scope = \"user\"` alternatives or launchd/other platform mechanisms on non-Linux systems"],"exampleFix":"# before\ncmd = \"mise bootstrap apply-privileged\"\n# after\ncmd = \"[[ $(uname -s) == Linux ]] && mise bootstrap apply-privileged || echo 'skipped: Linux only'\"","handlingStrategy":"fallback","validationCode":"[[ \"$(uname -s)\" == \"Linux\" ]] && systemctl is-system-running >/dev/null","typeGuard":"const isLinux = process.platform === \"linux\";","tryCatchPattern":"match apply_privileged_plan() { Err(e) if e.contains(\"only supported on Linux\") => skip_on_non_linux(), other => other }","preventionTips":["Guard bootstrap-service steps with an OS check in task scripts","Exclude non-Linux runners from jobs that apply system services","Document that system bootstrap services require Linux + systemd"],"tags":["platform","systemd","linux-only"],"backgroundTag":"unsupported-platform","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}