Fix config path lookup #139
1 changed files with 4 additions and 4 deletions
|
@ -14,10 +14,10 @@ def load(config, opts) do
|
||||||
config_path =
|
config_path =
|
||||||
cond do
|
cond do
|
||||||
opts[:config_path] -> opts[:config_path]
|
opts[:config_path] -> opts[:config_path]
|
||||||
System.get_env("PLEROMA_CONFIG_PATH") -> System.get_env("PLEROMA_CONFIG_PATH")
|
|
||||||
System.get_env("AKKOMA_CONFIG_PATH") -> System.get_env("AKKOMA_CONFIG_PATH")
|
System.get_env("AKKOMA_CONFIG_PATH") -> System.get_env("AKKOMA_CONFIG_PATH")
|
||||||
File.exists?("/etc/akkoma/config.exs") -> "/etc/akkoma/config.exs"
|
System.get_env("PLEROMA_CONFIG_PATH") -> System.get_env("PLEROMA_CONFIG_PATH")
|
||||||
true -> "/etc/pleroma/config.exs"
|
File.exists?("/etc/pleroma/config.exs") -> "/etc/pleroma/config.exs"
|
||||||
|
true -> "/etc/akkoma/config.exs"
|
||||||
end
|
end
|
||||||
|
|
||||||
with_runtime_config =
|
with_runtime_config =
|
||||||
|
@ -31,7 +31,7 @@ def load(config, opts) do
|
||||||
warning = [
|
warning = [
|
||||||
IO.ANSI.red(),
|
IO.ANSI.red(),
|
||||||
IO.ANSI.bright(),
|
IO.ANSI.bright(),
|
||||||
"!!! Config path is not declared! Please ensure it exists and that PLEROMA_CONFIG_PATH is unset or points to an existing file",
|
"!!! Config path is not declared! Please ensure it exists and that AKKOMA_CONFIG_PATH and/or PLEROMA_CONFIG_PATH is unset or points to an existing file",
|
||||||
IO.ANSI.reset()
|
IO.ANSI.reset()
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue