{"record":{"id":"0e4e6ba2ae5609fe","repo":"jdx/mise","slug":"path-is-not-in-either-snapshot-0e4e6b","errorCode":null,"errorMessage":"path is not in either snapshot","messagePattern":"path is not in either snapshot","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/shadow.rs","lineNumber":949,"sourceCode":"            (b, opts.paths.as_ref().map(|p| p.1.as_str())),\n        ] {\n            for entry in self.ls_tree(tree)? {\n                if entry.path.starts_with(\".mise-history/\") {\n                    continue;\n                }\n                if let Some(prefix) = prefix {\n                    if entry.path == prefix {\n                        paths.insert(String::new());\n                    } else if let Some(relative) = entry.path.strip_prefix(&format!(\"{prefix}/\")) {\n                        paths.insert(relative.to_string());\n                    }\n                } else {\n                    paths.insert(entry.path);\n                }\n            }\n        }\n        if paths.is_empty() && opts.paths.is_some() {\n            bail!(\"path is not in either snapshot\");\n        }\n        let mut output = vec![];\n        let mut changed = false;\n        for relative in paths {\n            let path = |prefix: &str| {\n                if relative.is_empty() {\n                    prefix.to_string()\n                } else {\n                    format!(\"{prefix}/{relative}\")\n                }\n            };\n            let (left_path, right_path) = opts.paths.as_ref().map_or_else(\n                || (relative.clone(), relative.clone()),\n                |(left, right)| (path(left), path(right)),\n            );\n            let left = self.restored_object_at(a, &left_path)?;\n            let right = self.restored_object_at(b, &right_path)?;\n            if left == right {","sourceCodeStart":931,"sourceCodeEnd":967,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/history/shadow.rs#L931-L967","documentation":"decrypted_diff decrypts the compared snapshots and diffs them as temporary plaintext files. It collects the set of changed entries; when a path filter is supplied but the filtered path matches no entry in either snapshot, the diff cannot proceed and bails.","triggerScenarios":"Calling decrypted_diff (via diff, when decryption is required) with opts.paths set to a path that appears in neither snapshot's entry list.","commonSituations":"Path filter typo; the file is identical/untracked in both snapshots so no entry exists for it; passing a path rooted differently than snapshot-relative entries (leading slash or drive-letter differences).","solutions":["Confirm the exact snapshot-relative path (list entries of the snapshots) and retry","Remove the path filter to see all changed paths","Pick a different pair of snapshots where the file actually changed"],"exampleFix":"// before\ndecrypted diff a b --path \"home/.bashrc \"  (trailing space)\n\n// after\ndecrypted diff a b --path \"home/.bashrc\"","handlingStrategy":"validation","validationCode":"// Rust: verify the filtered path occurs in decrypted snapshot entries first\nlet entries: Vec<String> = decrypted_entries(&from, &to);\nanyhow::ensure!(\n    opts.paths.as_ref().map_or(true, |p| p.iter().all(|q| entries.iter().any(|e| e.contains(q)))),\n    \"filtered path not present in either decrypted snapshot\"\n);","typeGuard":null,"tryCatchPattern":"match differ.decrypted_diff(from, to, &opts) {\n    Err(e) if e.to_string().contains(\"path is not in either snapshot\") => {\n        eprintln!(\"no decrypted entry matched the filter; drop --path to list changes\");\n    }\n    other => other?,\n}","preventionTips":["List decrypted snapshot entries to confirm exact path spelling before filtering","Watch for trailing whitespace and leading-slash differences in path filters","If the file is identical in both snapshots it will not appear as an entry; use plain diff with paths instead"],"tags":["diff","decryption","path"],"backgroundTag":"resource-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"}