{"record":{"id":"6c4caad1c69380c0","repo":"jdx/mise","slug":"managed-system-files-are-only-supported-on-unix","errorCode":null,"errorMessage":"managed system files are only supported on Unix","messagePattern":"managed system files are only supported on Unix","errorType":"error_code","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/system/managed_files.rs","lineNumber":979,"sourceCode":"                    resolve_group(group)?;\n                }\n            }\n        }\n    }\n    Ok(())\n}\n\n#[cfg(not(unix))]\npub(crate) fn validate_principals(\n    files: &[ManagedFileRequest],\n    directories: &[ManagedDirectoryRequest],\n    _accounts: Option<&super::accounts::AccountRequests>,\n    _allow_pending_accounts: bool,\n) -> Result<()> {\n    if files.is_empty() && directories.is_empty() {\n        return Ok(());\n    }\n    bail!(\"managed system files are only supported on Unix\")\n}\n\nimpl PrivilegedAction {\n    fn requires_preemptive_elevation(&self) -> Result<bool> {\n        match self {\n            // Ownership changes normally require privilege. Avoid creating or\n            // replacing a path before discovering that at set_metadata().\n            Self::WriteFile {\n                path,\n                owner,\n                group,\n                replace,\n                ..\n            } => Ok(owner.is_some()\n                || group.is_some()\n                || (*replace && replacement_is_not(path, ManagedPathKind::File)?)),\n            Self::CreateDirectory {\n                path,","sourceCodeStart":961,"sourceCodeEnd":997,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/managed_files.rs#L961-L997","documentation":"The managed system files/directories feature ([bootstrap.files] and [bootstrap.directories]) is implemented only on Unix. On non-Unix builds (e.g. Windows), the validation entry point unconditionally bails whenever any file or directory entries are declared. An empty set is allowed and silently skipped.","triggerScenarios":"Running `mise bootstrap` (or any config load that validates it) on a non-Unix platform with at least one entry in [bootstrap.files] or [bootstrap.directories].","commonSituations":"Sharing one mise.toml across a team where some developers run Windows; CI on Windows runners picking up a config written for Linux servers.","solutions":["Run the bootstrap on a Unix machine (Linux/macOS); there is no Windows implementation.","Remove or empty the [bootstrap.files]/[bootstrap.directories] sections on Windows to avoid the error.","Gate the config behind a platform-conditional include or keep managed-file config in a machine-specific file not loaded on Windows."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"if process.platform !== 'linux' && config['bootstrap']?.files?.length {\n  throw new Error('[bootstrap.files] requires Unix; remove it on this platform');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep bootstrap.files config in a machine/OS-specific file not loaded on Windows.","Document that managed system files are Unix-only for your team.","Check `mise doctor`/platform before enabling the feature in shared configs."],"tags":["platform","windows","unsupported","bootstrap"],"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"}