Skip to content

Commit 8c1b563

Browse files
committed
Keep yes?/1 as a callback, closes #11372
1 parent ece0530 commit 8c1b563

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/mix/lib/mix/shell.ex

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ defmodule Mix.Shell do
1818

1919
@doc """
2020
Executes the given command and returns its exit status.
21+
22+
Shortcut for `cmd/2` with empty options.
2123
"""
2224
@callback cmd(command :: String.t()) :: integer
2325

@@ -46,6 +48,17 @@ defmodule Mix.Shell do
4648

4749
@doc """
4850
Prompts the user for confirmation.
51+
52+
Shortcut for `yes?/2` with empty options.
53+
"""
54+
@callback yes?(message :: binary) :: boolean
55+
56+
@doc """
57+
Prompts the user for confirmation.
58+
59+
## Options
60+
61+
* `:default` - `:yes` or `:no` (the default is `:yes`)
4962
"""
5063
@callback yes?(message :: binary, options :: keyword) :: boolean
5164

0 commit comments

Comments
 (0)