{"record":{"id":"7d54f00dd788d05b","repo":"jdx/mise","slug":"invalid-manifest-manifest-for-dotfile-target","errorCode":null,"errorMessage":"invalid manifest {manifest:?} for dotfile {target}","messagePattern":"invalid manifest (.+?) for dotfile (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/files.rs","lineNumber":624,"sourceCode":"                        || content.is_some()\n                        || manifest.is_some()\n                        || exclude.is_some())\n                {\n                    bail!(\n                        \"tracked file {target} cannot declare source, content, manifest, or exclude\"\n                    );\n                }\n                if source.is_some() && content.is_some() {\n                    bail!(\"dotfile {target} cannot declare both source and content\");\n                }\n                if mode != FileMode::Track && source.is_none() && content.is_none() {\n                    implied_source(&resolve_target_arg(&target))?;\n                }\n                if let Some(manifest) = manifest\n                    && (FileManifest::parse(&manifest).is_none()\n                        || !matches!(mode, FileMode::Copy | FileMode::SymlinkEach))\n                {\n                    bail!(\"invalid manifest {manifest:?} for dotfile {target}\");\n                }\n                for pattern in exclude.into_iter().flatten() {\n                    glob::Pattern::new(&pattern)?;\n                }\n            }\n        }\n    }\n    Ok(())\n}\n\n/// Aggregate `[dotfiles]` across a specific set of config files. This is\n/// used by OCI builds, which intentionally scope config to project files by\n/// default instead of blindly inheriting global dotfiles.\npub(crate) fn files_from_config_files(config_files: &ConfigMap) -> Vec<FileRequest> {\n    files_from_config_files_with_tracking_roots(config_files, None)\n}\n\nfn files_from_config_files_with_tracking_roots(","sourceCodeStart":606,"sourceCodeEnd":642,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/files.rs#L606-L642","documentation":"The `manifest` key is only valid for `mode = \"copy\"` or `mode = \"symlink-each\"` entries, and its value must parse as a valid file manifest (via `FileManifest::parse`). A manifest on any other mode, or a string that is not a recognized manifest, makes the entry invalid and aborts validation.","triggerScenarios":"Setting `manifest = \"...\"` on an entry whose resolved mode is the default (symlink), track, or template; or supplying a malformed manifest string that `FileManifest::parse` cannot interpret.","commonSituations":"Adding `manifest` to a symlinked dotfile expecting per-link control, misspelling the manifest format, or copying a manifest snippet between entries with different modes.","solutions":["Change the entry's mode to `copy` or `symlink-each` if a manifest is required.","Otherwise remove the `manifest` key from entries that don't use copy/symlink-each.","Verify the manifest string matches the expected format accepted by `FileManifest::parse`."],"exampleFix":"// before\n[dotfiles.\"~/.config/app\"]\nsource = \"app\"\nmanifest = \"links.toml\"\n\n// after\n[dotfiles.\"~/.config/app\"]\nsource = \"app\"\nmode = \"symlink-each\"\nmanifest = \"links.toml\"","handlingStrategy":"validation","validationCode":"const MANIFEST_MODES = new Set(['copy', 'symlink-each']);\nfunction assertManifestEntry(entry, target) {\n  if (entry.manifest != null && !MANIFEST_MODES.has(entry.mode))\n    throw new Error(`${target}: manifest requires copy or symlink-each mode`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  applyDotfiles();\n} catch (e) {\n  if (/invalid manifest/.test(e.message)) {\n    console.error('Set mode to copy/symlink-each, or remove the manifest key, and verify its format');\n  } else throw e;\n}","preventionTips":["Only add manifests after setting mode = copy or symlink-each","Validate manifest strings against the documented format","Keep manifest snippets next to the entries whose mode they require"],"tags":["dotfiles","config-validation","manifest","mise"],"backgroundTag":"invalid-enum-value","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}