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
This commit is contained in:
parent
ddd04d1c52
commit
ebee9f59d8
4 changed files with 18 additions and 1 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
defmodule Mix.Tasks.Pleroma.Ecto.Rollback do
|
||||
use Mix.Task
|
||||
import Mix.Pleroma
|
||||
require Logger
|
||||
@shortdoc "Wrapper on `ecto.rollback` task"
|
||||
|
||||
|
|
@ -36,6 +37,7 @@ defmodule Mix.Tasks.Pleroma.Ecto.Rollback do
|
|||
|
||||
@impl true
|
||||
def run(args \\ []) do
|
||||
load_pleroma()
|
||||
{opts, _} = OptionParser.parse!(args, strict: @switches, aliases: @aliases)
|
||||
|
||||
opts =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue