Mix.Shell.Process.yes-question-mark
You're seeing just the function
yes-question-mark
, go back to Mix.Shell.Process module for more information.
Forwards the message to the current process.
It also checks the inbox for an input message matching:
{:mix_shell_input, :yes?, value}
If one does not exist, it will abort since there was no shell
process inputs given. value
must be true
or false
.
Example
# Send the response to self() first so that yes?/1 will be able to read it
send(self(), {:mix_shell_input, :yes?, true})
Mix.shell().yes?("Are you sure you want to continue?")