Fallback to Config if Mix.Config does not exist, even if Config does not
exist either For some weird reason Code.ensure_loaded?(Config) is false on OTP releases even though `use Config` from config files works just fine.
This commit is contained in:
parent
55742d978d
commit
f4009b6706
|
@ -3,7 +3,7 @@
|
||||||
# NOTE: This file should not be committed to a repo or otherwise made public
|
# NOTE: This file should not be committed to a repo or otherwise made public
|
||||||
# without removing sensitive information.
|
# without removing sensitive information.
|
||||||
|
|
||||||
<%= if Code.ensure_loaded?(Config) do
|
<%= if Code.ensure_loaded?(Config) or not Code.ensure_loaded?(Mix.Config) do
|
||||||
"import Config"
|
"import Config"
|
||||||
else
|
else
|
||||||
"use Mix.Config"
|
"use Mix.Config"
|
||||||
|
|
Loading…
Reference in a new issue