Check if git is available on the system.
()
| 12 | |
| 13 | /// Check if git is available on the system. |
| 14 | pub fn is_git_available() -> bool { |
| 15 | Command::new("git") |
| 16 | .arg("--version") |
| 17 | .output() |
| 18 | .map(|o| o.status.success()) |
| 19 | .unwrap_or(false) |
| 20 | } |
| 21 | |
| 22 | /// Get the git installation directory in user's home. |
| 23 | fn git_install_dir() -> PathBuf { |
no test coverage detected