instance.gen task: fix crash when using custom static directory
Closes #1082
This commit is contained in:
parent
d240ce41b5
commit
5e4fe0e8f7
2 changed files with 8 additions and 1 deletions
|
|
@ -3,9 +3,10 @@
|
|||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
defmodule Pleroma.InstanceTest do
|
||||
use ExUnit.Case, async: true
|
||||
use ExUnit.Case
|
||||
|
||||
setup do
|
||||
static_dir = Pleroma.Config.get([:instance, :static_dir])
|
||||
File.mkdir_p!(tmp_path())
|
||||
|
||||
on_exit(fn ->
|
||||
|
|
@ -15,6 +16,8 @@ defmodule Pleroma.InstanceTest do
|
|||
if File.exists?(static_dir) do
|
||||
File.rm_rf(Path.join(static_dir, "robots.txt"))
|
||||
end
|
||||
|
||||
Pleroma.Config.put([:instance, :static_dir], static_dir)
|
||||
end)
|
||||
|
||||
:ok
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue