Even if interrupts are allowed to propagate eg. by using ctrlc, the password prompt seems to inhibit this (at least, via CTRL-C). Here's a test program:
fn main() -> std::io::Result<()> {
_ = ctrlc::set_handler(|| {});
dialoguer::Input::<String>::new()
.with_prompt("You can interrupt this")
.report(false)
.interact()?;
dialoguer::Password::new()
.with_prompt("You cannot interrupt this")
.report(false)
.interact()?;
Ok(())
}
I suspect the issue is actually in the console crate (in read_secure()) but I haven't had an opportunity to narrow the test down to just that.
- Dialoguer 0.12.0
- Rust 1.94.0
- Ubuntu 24.04.4
- Zsh 5.9
Even if interrupts are allowed to propagate eg. by using
ctrlc, the password prompt seems to inhibit this (at least, via CTRL-C). Here's a test program:I suspect the issue is actually in the console crate (in
read_secure()) but I haven't had an opportunity to narrow the test down to just that.