(home: &Path)
| 288 | } |
| 289 | |
| 290 | fn codex_plugin_cached_install_dirs(home: &Path) -> Vec<PathBuf> { |
| 291 | let mut dirs = Vec::new(); |
| 292 | for root in [ |
| 293 | codex_plugin_cached_root(home), |
| 294 | codex_plugin_legacy_cached_root(home), |
| 295 | ] { |
| 296 | let Ok(entries) = std::fs::read_dir(root) else { |
| 297 | continue; |
| 298 | }; |
| 299 | dirs.extend( |
| 300 | entries |
| 301 | .filter_map(|entry| entry.ok().map(|entry| entry.path())) |
| 302 | .filter(|path| path.is_dir() && codex_plugin_dir_is_tracedecay(path)), |
| 303 | ); |
| 304 | } |
| 305 | dirs.sort(); |
| 306 | dirs.dedup(); |
| 307 | dirs |
| 308 | } |
| 309 | |
| 310 | fn codex_plugin_manifest_path(home: &Path) -> PathBuf { |
| 311 | codex_plugin_install_dir(home).join(".codex-plugin/plugin.json") |
no test coverage detected