mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Honor XDG_CONFIG_HOME
ENV variable
Following XDG Spec: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
This commit is contained in:
parent
749da0984c
commit
102e2834b6
1 changed files with 4 additions and 3 deletions
|
@ -24,9 +24,10 @@ class Ameba::Config
|
|||
json: Formatter::JSONFormatter,
|
||||
}
|
||||
|
||||
DEFAULT_PATHS = {
|
||||
"~/.ameba.yml",
|
||||
"~/.config/ameba/config.yml",
|
||||
XDG_CONFIG_HOME = ENV.fetch("XDG_CONFIG_HOME", "~/.config")
|
||||
DEFAULT_PATHS = {
|
||||
Path["~/.ameba.yml"],
|
||||
Path[XDG_CONFIG_HOME] / "ameba/config.yml",
|
||||
}
|
||||
FILENAME = ".ameba.yml"
|
||||
DEFAULT_PATH = Path[Dir.current] / FILENAME
|
||||
|
|
Loading…
Reference in a new issue