projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switch to Jason over Poison
[akkoma]
/
lib
/
mix
/
tasks
/
pleroma
/
common.ex
diff --git
a/lib/mix/tasks/pleroma/common.ex
b/lib/mix/tasks/pleroma/common.ex
index 2e246c4b56833e886d26318f7e51a616f6b9fdd0..48c0c13464325f937801343c7cb9ad7a3fe4b381 100644
(file)
--- a/
lib/mix/tasks/pleroma/common.ex
+++ b/
lib/mix/tasks/pleroma/common.ex
@@
-1,16
+1,20
@@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Mix.Tasks.Pleroma.Common do
defmodule Mix.Tasks.Pleroma.Common do
- @
short
doc "Common functions to be reused in mix tasks"
+ @doc "Common functions to be reused in mix tasks"
def start_pleroma do
Mix.Task.run("app.start")
end
def start_pleroma do
Mix.Task.run("app.start")
end
- def get_option(options, opt, prompt, def \\ nil, defname \\ nil) do
+ def get_option(options, opt, prompt, def
val
\\ nil, defname \\ nil) do
Keyword.get(options, opt) ||
Keyword.get(options, opt) ||
- case Mix.shell().prompt("#{prompt} [#{defname || def}]") do
+ case Mix.shell().prompt("#{prompt} [#{defname || def
val
}]") do
"\n" ->
"\n" ->
- case def do
- nil -> get_option(options, opt, prompt, def)
- def
-> def
+ case def
val
do
+ nil -> get_option(options, opt, prompt, def
val
)
+ def
val -> defval
end
opt ->
end
opt ->