pijul_org / pijul

Support PIJUL_CONFIG_DIR env variable

By yory on April 25, 2018
This patch is not signed.
9KjUrxwi42B8DgXxhrGrhrzkaLUC7K5Uv9SnGuDzB9LH3e4Q2eaisd7mA5CpxGzwGUreDTKJo8jPJ361NDHd75SS
This patch is in the following branches:
latest
master
testing
In file pijul/src












    match std::env::var("PIJUL_CONFIG_DIR") {
        Ok(var) => {
            let mut path = PathBuf::new();
            path.push(var);
        }
        Err(_) => {
            if let Some(mut path) = std::env::home_dir() {
                path.push(".pijulconfig");
                Ok(path)
            } else {
                Err(ErrorKind::NoHomeDir.into())
            }