(args: &[&str])
| 6 | use std::{fs, thread}; |
| 7 | |
| 8 | pub fn git_exec(args: &[&str]) -> Result<Output> { |
| 9 | let output = Command::new("git").args(args).output(); |
| 10 | match output { |
| 11 | Ok(output) => Ok(output), |
| 12 | Err(e) => Err(anyhow!( |
| 13 | "Failed to run git. Make sure git is installed\nAdditional info: {}", |
| 14 | e |
| 15 | )), |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | pub fn get_git_path() -> Result<PathBuf> { |
| 20 | let output = git_exec(&["rev-parse", "--absolute-git-dir"])?; |
no outgoing calls
no test coverage detected