Rename def to defval
This commit is contained in:
parent
1d11c4cf11
commit
08e10a70ec
@ -4,13 +4,13 @@ defmodule Mix.Tasks.Pleroma.Common do
|
|||||||
Mix.Task.run("app.start")
|
Mix.Task.run("app.start")
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_option(options, opt, prompt, def \\ nil, defname \\ nil) do
|
def get_option(options, opt, prompt, defval \\ 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 || defval}]") do
|
||||||
"\n" ->
|
"\n" ->
|
||||||
case def do
|
case defval do
|
||||||
nil -> get_option(options, opt, prompt, def)
|
nil -> get_option(options, opt, prompt, defval)
|
||||||
def -> def
|
defval -> defval
|
||||||
end
|
end
|
||||||
|
|
||||||
opt ->
|
opt ->
|
||||||
|
Loading…
Reference in New Issue
Block a user