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
|
@ -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 New Issue