summaryrefslogtreecommitdiffstats
path: root/vendor/gix/src/path.rs
blob: 9fd6d4b01691a1f46f13637bafd39d66eb2601a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
use std::path::PathBuf;

pub use gix_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"))
    })
}