(base: &Path, raw: &str)
| 42 | } |
| 43 | |
| 44 | fn resolve_skill_path(base: &Path, raw: &str) -> PathBuf { |
| 45 | if let Some(stripped) = raw.strip_prefix("~/") { |
| 46 | if let Some(home) = home_dir() { |
| 47 | return home.join(stripped); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | let path = PathBuf::from(raw); |
| 52 | if path.is_absolute() { |
| 53 | path |
| 54 | } else { |
| 55 | base.join(path) |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | fn collect_skill_roots(base: &Path) -> Vec<PathBuf> { |
| 60 | let mut roots = Vec::new(); |
no test coverage detected