projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[#3213] Performance-related stat in HashtagsTableMigrator. Reworked `count/_` to...
[akkoma]
/
lib
/
pleroma
/
frontend.ex
diff --git
a/lib/pleroma/frontend.ex
b/lib/pleroma/frontend.ex
index 3413d2fbad1dd2c8ab156344e025c6bce789feb3..34b7befb86a1fdc2f8d851e29518fdb54b13f67a 100644
(file)
--- a/
lib/pleroma/frontend.ex
+++ b/
lib/pleroma/frontend.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-202
0
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-202
1
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Frontend do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Frontend do
@@
-8,16
+8,16
@@
defmodule Pleroma.Frontend do
require Logger
def install(name, opts \\ []) do
require Logger
def install(name, opts \\ []) do
-
cmd_
frontend_info = %{
+ frontend_info = %{
"ref" => opts[:ref],
"build_url" => opts[:build_url],
"build_dir" => opts[:build_dir]
}
"ref" => opts[:ref],
"build_url" => opts[:build_url],
"build_dir" => opts[:build_dir]
}
- config_frontend_info = Config.get([:frontends, :available, name], %{})
-
frontend_info =
frontend_info =
- Map.merge(config_frontend_info, cmd_frontend_info, fn _key, config, cmd ->
+ [:frontends, :available, name]
+ |> Config.get(%{})
+ |> Map.merge(frontend_info, fn _key, config, cmd ->
# This only overrides things that are actually set
cmd || config
end)
# This only overrides things that are actually set
cmd || config
end)
@@
-42,9
+42,11
@@
defmodule Pleroma.Frontend do
else
{:download_or_unzip, _} ->
Logger.info("Could not download or unzip the frontend")
else
{:download_or_unzip, _} ->
Logger.info("Could not download or unzip the frontend")
+ {:error, "Could not download or unzip the frontend"}
_e ->
Logger.info("Could not install the frontend")
_e ->
Logger.info("Could not install the frontend")
+ {:error, "Could not install the frontend"}
end
end
end
end