{"record":{"id":"26f8d49270917d74","repo":"jdx/mise","slug":"source-directory-is-missing-so-managed-children-c","errorCode":null,"errorMessage":"source directory is missing, so managed children cannot be identified","messagePattern":"source directory is missing, so managed children cannot be identified","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/files.rs","lineNumber":2792,"sourceCode":"            }\n        }\n        FileMode::Copy | FileMode::SymlinkEach if req.source.is_dir() => {\n            if req.target.is_symlink() || (req.target.exists() && !req.target.is_dir()) {\n                if opts.force {\n                    paths.insert(req.target.clone(), ());\n                } else {\n                    bail!(\"target is not the managed directory, use --force to remove it\");\n                }\n            } else if req.target.is_dir() {\n                for (source, target) in walk_source_files(req)? {\n                    plan_regular_file(&source, &target, opts.force, &mut paths)?;\n                }\n                cleanup_empty_dirs = true;\n            }\n        }\n        FileMode::Copy => {\n            if req.target.is_dir() && !req.source.exists() {\n                bail!(\"source directory is missing, so managed children cannot be identified\");\n            }\n            plan_single_file(req, opts, &mut paths)?;\n        }\n        // a tracked file was never written by mise: stop tracking it with\n        // `mise dot untrack`, the file itself stays\n        FileMode::Track => {\n            info!(\n                \"files: {} is tracked in place; nothing to remove (use `mise dot untrack` to stop tracking it)\",\n                req.target.display_user()\n            );\n            return Ok(None);\n        }\n        FileMode::Content => {\n            if !req.target.exists() && !req.target.is_symlink() {\n                return Ok(None);\n            }\n            if opts.force {\n                paths.insert(req.target.clone(), ());","sourceCodeStart":2774,"sourceCodeEnd":2810,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/files.rs#L2774-L2810","documentation":"For a Copy entry with a directory source, unapply identifies managed children by walking the source tree. If the source directory no longer exists, mise cannot tell which files under the target were created by it and which are user-owned, so it aborts that entry rather than risking deletion of unmanaged files.","triggerScenarios":"`mise dot unapply` (or a planning pass) on a Copy entry where the source directory was deleted/renamed while the target directory still exists.","commonSituations":"The dotfiles repository was deleted or moved without updating the config; a partial clone or sync removed the source subdirectory; typo introduced in the config `source` path during editing.","solutions":["Restore the source directory (re-clone the dotfiles repo or move it back) and re-run unapply.","Fix the `source` path in the `[dotfiles]` entry if it was renamed.","If the source is unrecoverable and you accept removing the whole target, delete the target directory manually and remove the entry from config."],"exampleFix":"// before: source ~/dotfiles/nvim deleted, target ~/.config/nvim remains\ngit clone git@github.com:you/dotfiles.git ~/dotfiles\nmise dot unapply   # now the source walk can identify managed children","handlingStrategy":"validation","validationCode":"src=\"$HOME/dotfiles/nvim\"; [ -d \"$src\" ] || echo \"source directory missing: $src\"; grep -A1 '\\[dotfiles\\]' mise.toml","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never delete or move the dotfiles source repo while entries are applied.","Update `[dotfiles]` source paths in the same commit/step that moves the repo.","Keep the source repo under version control so accidental deletions are recoverable."],"tags":["dotfiles","copy","missing-source"],"backgroundTag":"directory-not-found","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"}