aboutsummaryrefslogtreecommitdiff
path: root/lib/mix/tasks
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-06-08 20:10:25 +0300
committerrinpatch <rinpatch@sdf.org>2019-06-08 20:10:48 +0300
commit7223c1b643874f368937969be441c42f7eb55d14 (patch)
tree3e0b9c2dc8d3710ae307526aaf868a9005273ac7 /lib/mix/tasks
parentd7ec0898e5aa7acae463760fd85d1ebf8307b4f9 (diff)
downloadpleroma-7223c1b643874f368937969be441c42f7eb55d14.tar.gz
Use Mix.shell().yes? if available
Diffstat (limited to 'lib/mix/tasks')
-rw-r--r--lib/mix/tasks/pleroma/common.ex4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/mix/tasks/pleroma/common.ex b/lib/mix/tasks/pleroma/common.ex
index 0e03a7872..7d50605af 100644
--- a/lib/mix/tasks/pleroma/common.ex
+++ b/lib/mix/tasks/pleroma/common.ex
@@ -37,7 +37,9 @@ defmodule Mix.Tasks.Pleroma.Common do
end
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
def shell_info(message) do