devrc 0.6.0

devrc is an easy to use task runner tool on steroids for developers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::{
    env,
    path::{Path, PathBuf},
};

/// netrc file name
const NETRC_FILE_NAME: &str = ".netrc";

/// Get absolute path to user's netrc file
pub fn get_user_defined_netrc_path() -> Option<PathBuf> {
    match env::var("NETRC") {
        Ok(path) => Some(PathBuf::from(path)),
        Err(_) => dirs_next::home_dir().map(|path| Path::new(&path).join(NETRC_FILE_NAME)),
    }
}