diff options
author | rinpatch <rinpatch@sdf.org> | 2019-06-22 04:17:04 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-06-22 04:17:04 +0300 |
commit | ebee9f59d84c31b755611033d4abe2938201a65e (patch) | |
tree | 641ea42fe1ed87de93890ab75c4bbc90eb933731 /lib/mix/pleroma.ex | |
parent | ddd04d1c52a0ce7cc44f14c736cb2271ecf279e9 (diff) | |
download | pleroma-ebee9f59d84c31b755611033d4abe2938201a65e.tar.gz pleroma-ebee9f59d84c31b755611033d4abe2938201a65e.zip |
Ecto tasks: Resolve relative path using the application directory
instead of cwd and load the application before doing anything
In OTP releases cwd != app directory and the configuration is read
only if the application is loaded
Diffstat (limited to 'lib/mix/pleroma.ex')
-rw-r--r-- | lib/mix/pleroma.ex | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/mix/pleroma.ex b/lib/mix/pleroma.ex index 548c8a0a4..1b758ea33 100644 --- a/lib/mix/pleroma.ex +++ b/lib/mix/pleroma.ex @@ -9,6 +9,10 @@ defmodule Mix.Pleroma do {:ok, _} = Application.ensure_all_started(:pleroma) end + def load_pleroma do + Application.load(:pleroma) + end + def get_option(options, opt, prompt, defval \\ nil, defname \\ nil) do Keyword.get(options, opt) || shell_prompt(prompt, defval, defname) end |