Current section
Files
Jump to
Current section
Files
lib/skua/auth/yes_shell.ex
defmodule Skua.Auth.YesShell do
@moduledoc false
# A Mix.Shell that auto-confirms every prompt, so `skua.gen.auth` can run
# `phx.gen.auth` (which asks "proceed?" / "LiveView-based?" via Mix.shell().yes?)
# non-interactively. Output is delegated to the normal IO shell.
@behaviour Mix.Shell
@impl true
defdelegate print_app(), to: Mix.Shell.IO
@impl true
defdelegate info(message), to: Mix.Shell.IO
@impl true
defdelegate error(message), to: Mix.Shell.IO
@impl true
def cmd(command, opts \\ []), do: Mix.Shell.IO.cmd(command, opts)
@impl true
def prompt(_message), do: "y"
@impl true
def yes?(_message, _options \\ []), do: true
end