jdx/mise · error
: tracked in place; pass `--mode copy` after `mise dot…
Error message
{target_raw}: tracked in place; pass `--mode copy` after `mise dot untrack {target_raw}` to seed a source instead What it means
`mise dot add` refuses to add a target path that is already managed as a tracked (symlink) dotfile entry. Tracking in place means mise already owns a symlink at the target, so adding it again would create conflicting management. The message tells the user how to convert it: untrack it, then re-add with `--mode copy` to seed a real source file.
Solutions
- Untrack the target first: `mise dot untrack <target>`, then re-add with `mise dot add <target> --mode copy`
- Edit the `[dotfiles]` section in your mise config and remove or rename the existing track entry before re-adding
- Check current management with `mise dot list` (or inspect `[dotfiles]` in the config) before adding
Example fix
// before: fails, target already tracked $ mise dot add ~/.gitconfig --mode copy // after $ mise dot untrack ~/.gitconfig $ mise dot add ~/.gitconfig --mode copy
Defensive patterns
Strategy: validation
Validate before calling
if managed.iter().any(|req| req.mode == FileMode::Track && req.target == target) {
eprintln!("{target} already tracked; run `mise dot untrack {target}` first");
return;
} Prevention
- Run `mise dot list` before adding a target
- Treat `mise dot add` as non-idempotent; script around it with an existence check
When it happens
Trigger: Running `mise dot add <path>` where `<path>` already appears in `[dotfiles]` config as a `FileMode::Track` entry with the same target; i.e. the target is already symlink-tracked by mise.
Common situations: User forgot they already tracked the file; re-running a scripted `mise dot add` invocation; converting a tracked entry to a copied one without first untracking.
Understand the failure class
Background: "already exists" / EEXIST / FileAlreadyExistsException: what the 'file already exists' error means and how to fix it — this error's family across 37 libraries.
Related errors
- a glob is required
- `--all` needs `--to
- at least one target or --changed is required
- cannot apply
- cannot connect a setup repository
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/a08bbe1ae4a077e0.
Report an issue: GitHub.
Appendix: source
Thrown at src/cli/dotfiles/add.rs:170
cwd: None,
prefer_toml: true,
prevent_home_local: true,
})?;
let mut planned = vec![];
let managed_edits = system::edits::edits_from_config(&config)?;
for target_raw in &self.targets {
let target = system::files::resolve_target_arg(target_raw)
.components()
.collect::<PathBuf>();
if target.is_relative() {
bail!("{target_raw}: target must be absolute or start with ~/");
}
if managed
.iter()
.any(|req| req.mode == FileMode::Track && req.target == target)
{
bail!(
"{target_raw}: tracked in place; pass `--mode copy` after `mise dot untrack {target_raw}` to seed a source instead"
);
}
if managed_edits.iter().any(|req| {
system::files::matches_target(
&req.path,
&req.path_raw,
std::slice::from_ref(target_raw),
)
}) {
bail!(
"{target_raw}: target is already managed by [dotfiles] edits; remove or rename those entries before adding a whole-file dotfile"
);
}
let existing = managed.iter().find(|req| {
system::files::matches_target(
&req.target,
&req.target_raw,View on GitHub (pinned to 533346cc37)