From 7223c1b643874f368937969be441c42f7eb55d14 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sat, 8 Jun 2019 20:10:25 +0300 Subject: [PATCH] Use Mix.shell().yes? if available --- lib/mix/tasks/pleroma/common.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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