From f4009b6706781f7d6caf75a29cc6e700e7c7e88f Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sat, 22 Jun 2019 02:29:49 +0300 Subject: [PATCH] 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. --- priv/templates/sample_config.eex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/priv/templates/sample_config.eex b/priv/templates/sample_config.eex index 526593d0a..8cadb995e 100644 --- a/priv/templates/sample_config.eex +++ b/priv/templates/sample_config.eex @@ -3,7 +3,7 @@ # NOTE: This file should not be committed to a repo or otherwise made public # 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" else "use Mix.Config" -- 2.45.2