(path: &FsPath)
| 3277 | Lazy::new(|| RwLock::new(HashMap::new())); |
| 3278 | |
| 3279 | fn is_git_repository(path: &FsPath) -> bool { |
| 3280 | let output = std::process::Command::new("git") |
| 3281 | .arg("-C") |
| 3282 | .arg(path) |
| 3283 | .arg("rev-parse") |
| 3284 | .arg("--is-inside-work-tree") |
| 3285 | .output(); |
| 3286 | match output { |
| 3287 | Ok(out) if out.status.success() => String::from_utf8_lossy(&out.stdout).trim() == "true", |
| 3288 | _ => false, |
| 3289 | } |
| 3290 | } |
| 3291 | |
| 3292 | async fn current_project_info() -> Result<ProjectInfo> { |
| 3293 | let cwd = std::env::current_dir() |
no test coverage detected