{"record":{"id":"a89b90f4a2592a49","repo":"jdx/mise","slug":"is-not-managed-by-dotfiles","errorCode":null,"errorMessage":"{} is not managed by [dotfiles]","messagePattern":"(.+?) is not managed by \\[dotfiles\\]","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/dotfiles/edit.rs","lineNumber":76,"sourceCode":"        }\n\n        if let Some(path) = source_for_target(&config, &target, &self.target)? {\n            open_or_create(&path)?;\n            crate::cli::editor::open_in_editor(&path)?;\n            if self.apply {\n                apply_target(&self.target).await?;\n            }\n            return Ok(());\n        }\n\n        if !self.yes && console::user_attended_stderr() {\n            let ok = prompt::confirm(format!(\"dotfiles: add {}?\", self.target))?.is_yes();\n            if !ok {\n                info!(\"dotfiles: skipped\");\n                return Ok(());\n            }\n        } else if !self.yes {\n            bail!(\"{} is not managed by [dotfiles]\", self.target);\n        }\n\n        DotfilesAdd {\n            targets: vec![self.target.clone()],\n            changed: false,\n            mode: self.mode.clone(),\n            source: self.source.clone(),\n            global: true,\n            local: false,\n            path: None,\n            dry_run: false,\n            no_apply: true,\n            force: false,\n            yes: true,\n        }\n        .run()\n        .await?;\n","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/cli/dotfiles/edit.rs#L58-L94","documentation":"`mise bootstrap dotfiles edit <target>` only edits files already managed by the `[dotfiles]` configuration. When the target is not found among managed requirements and the user has not passed --yes (which instead prompts to add it), run_inner bails with `<target> is not managed by [dotfiles]`. The prompt path (when --yes is given) offers to run DotfilesAdd automatically.","triggerScenarios":"Running `mise bootstrap dotfiles edit <path>` for a file that has no [dotfiles] requirement in any loaded config, without --yes. The lookup fails and the command refuses to proceed rather than silently creating an unmanaged edit.","commonSituations":"Typos in the target path; the dotfile exists in another machine's config but not this one; config file not loaded/trusted so its dotfiles entries are missing; trying to start managing a brand-new file with edit instead of add/track.","solutions":["Add the file first: `mise bootstrap dotfiles add <path>` (or `track <path>`), then run edit.","Re-run with `--yes` to accept the interactive prompt that offers to add the target automatically.","Check the exact target spelling and confirm the config declaring it is loaded (and trusted)."],"exampleFix":"# before\nmise bootstrap dotfiles edit ~/.zshrc   # not managed -> error\n# after\nmise bootstrap dotfiles add ~/.zshrc\nmise bootstrap dotfiles edit ~/.zshrc","handlingStrategy":"validation","validationCode":"// verify the target is managed before editing\nimport { execSync } from 'node:child_process';\nconst managed = JSON.parse(execSync('mise bootstrap dotfiles ls --json').toString());\nif (!managed.some(d => d.target === target)) {\n  execSync(`mise bootstrap dotfiles add ${target}`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  execSync(`mise bootstrap dotfiles edit ${target}`);\n} catch (e) {\n  if (String(e.stderr).includes('is not managed by [dotfiles]')) {\n    execSync(`mise bootstrap dotfiles add ${target}`);\n    execSync(`mise bootstrap dotfiles edit ${target}`);\n  } else throw e;\n}","preventionTips":["Run add/track before edit for any new dotfile.","Double-check the target path spelling against the managed list.","Ensure the config declaring the dotfile is loaded and trusted."],"tags":["cli","dotfiles","not-managed","precondition"],"backgroundTag":"entity-not-found","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"}