1 2 3 4 5 6 7 8 9 10 11 12 13 14
pub fn is_ci() -> bool { std::env::var_os("CI").is_some() } pub fn home_dir() -> Option<std::path::PathBuf> { if let Some(h) = std::env::var_os("HOME") { return Some(h.into()); } #[cfg(windows)] if let Some(h) = std::env::var_os("USERPROFILE") { return Some(h.into()); } None }