1 2 3 4 5 6 7 8 9 10 11
use std::path::PathBuf;
pub use git_path::*;
pub(crate) fn install_dir() -> std::io::Result<PathBuf> {
std::env::current_exe().and_then(|exe| {
exe.parent()
.map(ToOwned::to_owned)
.ok_or_else(|| std::io::Error::new(std::io::ErrorKind::Other, "no parent for current executable"))
})
}