Use Mix.shell().yes? if available
This commit is contained in:
parent
d7ec0898e5
commit
7223c1b643
1 changed files with 3 additions and 1 deletions
|
@ -37,7 +37,9 @@ defmodule Mix.Tasks.Pleroma.Common do
|
||||||
end
|
end
|
||||||
|
|
||||||
def shell_yes?(message) do
|
def shell_yes?(message) do
|
||||||
shell_prompt(message, "Yn") in ~w(Yn Y y)
|
if mix_shell?(),
|
||||||
|
do: Mix.shell().yes?("Continue?"),
|
||||||
|
else: shell_prompt(message, "Continue?") in ~w(Yn Y y)
|
||||||
end
|
end
|
||||||
|
|
||||||
def shell_info(message) do
|
def shell_info(message) do
|
||||||
|
|
Loading…
Reference in a new issue