jdx/mise · error

is not captured;

Error message

{} is not captured; {reason}

What it means

When `mise dot save` is given explicit paths, each path must be capturable: it must be a tracked dotfile entry that is present and not excluded. Untracked paths fail with 'track it with `mise dot track`'; tracked-but-unavailable paths fail with the exclusion/missing reason.

Solutions

  1. Track the file first: `mise dot track <path>`
  2. If tracked but failing, verify the file exists at the declared path and is not excluded from capture
  3. Check the exact path spelling

Example fix

// before
mise dot save ~/.zshrc        // fails if never tracked
// after
mise dot track ~/.zshrc
mise dot save ~/.zshrc
Defensive patterns

Strategy: validation

Validate before calling

path="$HOME/.zshrc"
mise dot status --target "$path" | grep -q "$path" || {
  echo "$path not tracked or not capturable; run mise dot track $path"
}
[ -f "$path" ] || echo "$path missing on disk"

Try / catch

mise dot save "$path" || {
  mise dot track "$path" && mise dot save "$path"
}

Prevention

When it happens

Trigger: Running `mise dot save <path>` where the path has no entry in the tracked set, or where entry_for() exists but the file is excluded, missing on disk, or omitted from capture.

Common situations: Saving a dotfile before ever tracking it; saving a path whose file was deleted or moved; saving a path excluded by capture rules (e.g. via ignore patterns); typos in the path argument.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/211cd2933aa4a597. Report an issue: GitHub.

Appendix: source

Thrown at src/cli/dotfiles/save.rs:99

                if !captured {
                    // saving a deleted manual-save path saves the deletion,
                    // provided the path was captured before (a path that
                    // never existed is not a deletion)
                    let deletion = tracked
                        .entry_for(&path)
                        .is_some_and(|entry| !entry.policy.autosave)
                        && std::fs::symlink_metadata(&path)
                            .is_err_and(|err| err.kind() == std::io::ErrorKind::NotFound)
                        && previously_captured(&store, &entries, &path)?;
                    if deletion {
                        continue;
                    }
                    let reason = if tracked.entry_for(&path).is_some() {
                        "it is excluded, missing, or omitted from capture"
                    } else {
                        "track it with `mise dot track`"
                    };
                    bail!("{} is not captured; {reason}", display_path(&path));
                }
            }
        }
        let mut draft = Draft::new(trigger);
        draft.explicit_paths = self
            .paths
            .iter()
            .map(|path| normalize_target(path))
            .collect();
        draft.description = self.description.clone();
        draft.description_source = Some(if trigger == Trigger::Agent {
            DescriptionSource::Agent
        } else {
            DescriptionSource::User
        });
        draft.task = self.task.clone();
        draft.labels = self.label.clone();
        tokio::task::spawn_blocking(move || self.save_checkpoint(&store, &tracked, draft)).await?

View on GitHub (pinned to 533346cc37)