Assert that XDG_RUNTIME_DIR is set if used

This commit is contained in:
Stephen Seo 2022-02-08 13:29:27 +09:00
parent 55f940d5d7
commit 62ce1bd9e7

View file

@ -290,6 +290,7 @@ fn main() -> Result<(), String> {
prefix_dir = opt.alternate_prefix_dir.clone();
} else {
prefix_dir = var("XDG_RUNTIME_DIR").map_err(|e| format!("{}", e))?;
assert!(!prefix_dir.is_empty(), "XDG_RUNTIME_DIR is not set");
}
let mut send_total_path = PathBuf::new();