Przeglądaj źródła

Use Mix.shell().yes? if available

tags/v1.1.4
rinpatch 5 lat temu
rodzic
commit
7223c1b643
1 zmienionych plików z 3 dodań i 1 usunięć
  1. +3
    -1
      lib/mix/tasks/pleroma/common.ex

+ 3
- 1
lib/mix/tasks/pleroma/common.ex Wyświetl plik

@@ -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


Ładowanie…
Anuluj
Zapisz