projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix frontend install mix task bug
[akkoma]
/
lib
/
mix
/
tasks
/
pleroma
/
frontend.ex
diff --git
a/lib/mix/tasks/pleroma/frontend.ex
b/lib/mix/tasks/pleroma/frontend.ex
index 2adbf8d72c9835cfbc01cf76aaabc306952742cc..0a48be1fe978c54176d683dba86a14f301236233 100644
(file)
--- a/
lib/mix/tasks/pleroma/frontend.ex
+++ b/
lib/mix/tasks/pleroma/frontend.ex
@@
-69,7
+69,7
@@
defmodule Mix.Tasks.Pleroma.Frontend do
fe_label = "#{frontend} (#{ref})"
fe_label = "#{frontend} (#{ref})"
- tmp_dir = Path.join(
dest, "tmp"
)
+ tmp_dir = Path.join(
[instance_static_dir, "frontends", "tmp"]
)
with {_, :ok} <-
{:download_or_unzip, download_or_unzip(frontend_info, tmp_dir, options[:file])},
with {_, :ok} <-
{:download_or_unzip, download_or_unzip(frontend_info, tmp_dir, options[:file])},
@@
-133,6
+133,7
@@
defmodule Mix.Tasks.Pleroma.Frontend do
defp install_frontend(frontend_info, source, dest) do
from = frontend_info["build_dir"] || "dist"
defp install_frontend(frontend_info, source, dest) do
from = frontend_info["build_dir"] || "dist"
+ File.rm_rf!(dest)
File.mkdir_p!(dest)
File.cp_r!(Path.join([source, from]), dest)
:ok
File.mkdir_p!(dest)
File.cp_r!(Path.join([source, from]), dest)
:ok