Function prompt

Source
fn prompt(msg: &str, args: &CommonArgs) -> Result<bool>
Available on crate feature hsc only.
Expand description

Prompt the user to confirm by typing yes or no.

Loops until the user confirms or declines, returning true if they confirmed.

If args.batch is true no confirmation will be asked.