shell_yes?/1 was not showing the correct message and always defaults to yes which...
authorMark Felder <feld@FreeBSD.org>
Fri, 27 Nov 2020 19:42:28 +0000 (13:42 -0600)
committerMark Felder <feld@FreeBSD.org>
Fri, 4 Dec 2020 17:49:56 +0000 (11:49 -0600)
lib/mix/pleroma.ex
lib/mix/tasks/pleroma/user.ex

index cd3f440743d094c3b950d2ff67c5c482ed0be830..7575f0ef847a7b414d6d9cec97d5c50c029d1033 100644 (file)
@@ -98,12 +98,6 @@ defmodule Mix.Pleroma do
     end
   end
 
-  def shell_yes?(message) do
-    if mix_shell?(),
-      do: Mix.shell().yes?("Continue?"),
-      else: shell_prompt(message, "Continue?") in ~w(Yn Y y)
-  end
-
   def shell_info(message) do
     if mix_shell?(),
       do: Mix.shell().info(message),
index a8d2514118992eea0850b713d2471733b4ed5960..ca9c8579f932d26406213abf3ed25d0a449563db 100644 (file)
@@ -60,7 +60,7 @@ defmodule Mix.Tasks.Pleroma.User do
       - admin: #{if(admin?, do: "true", else: "false")}
     """)
 
-    proceed? = assume_yes? or shell_yes?("Continue?")
+    proceed? = assume_yes? or shell_prompt("Continue?", "n") in ~w(Yn Y y)
 
     if proceed? do
       start_pleroma()