Skip to content

Commit

Permalink
feat: support XDG_CONFIG_HOME for receipts
Browse files Browse the repository at this point in the history
  • Loading branch information
mistydemeo committed Aug 28, 2024
1 parent 4984eaf commit 573f1e2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions axoupdater/src/receipt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ pub(crate) fn get_config_path(app_name: &str) -> AxoupdateResult<Utf8PathBuf> {
} else {
let home = if cfg!(windows) {
env::var("LOCALAPPDATA").map(PathBuf::from).ok()
} else if let Ok(config_home) = std::env::var("XDG_CONFIG_HOME") {
Some(PathBuf::from(config_home))
} else {
homedir::my_home()?.map(|path| path.join(".config"))
};
Expand Down

0 comments on commit 573f1e2

Please sign in to comment.