1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00

fix error

This commit is contained in:
mat 2022-10-30 13:07:14 -05:00
parent 99d3a5de9d
commit f0e9a48222

View file

@ -13,7 +13,7 @@ use std::path::PathBuf;
/// If the environment variable is not set, this will return `None`. /// If the environment variable is not set, this will return `None`.
pub fn minecraft_dir() -> Option<PathBuf> { pub fn minecraft_dir() -> Option<PathBuf> {
let env_var = home_env_var(); let env_var = home_env_var();
let home = std::env::var(env_var)?; let home = std::env::var(env_var).ok()?;
let path = PathBuf::from(home).join(minecraft_dir_relative()); let path = PathBuf::from(home).join(minecraft_dir_relative());
Some(path) Some(path)
} }