Files
typos/crates/typos-cli/tests
Amir ZarrinkafshandAlexander Kireev 160d792805 fix(cli): Don't panic when canonicalize fails mid-walk
`walk_entry` canonicalizes each entry's path to look up its policy, and routes a failure through `report_result`, which reports the error and then substitutes `T::default()` -- for a `PathBuf` that is the empty path. `ConfigEngine` never saw that path during the walk, so the `policy()` call immediately after aborts the process: a debug build trips the `debug_assert!` on `path.is_absolute()`, a release build reaches the `expect` below it.

Skip the entry after reporting the error instead, matching how a walk error is already handled a few lines above. A file removed by another process mid-scan is enough to reach this, so an abort here takes out an otherwise healthy run.

Fixes #1444 and Closes #1577

Co-authored-by: Alexander Kireev <ak.chatman.media@gmail.com>
Signed-off-by: Amir Zarrinkafsh <3339418+nightah@users.noreply.github.com>
2026-09-11 12:00:46 +10:00
..