Ctrl c exit issue (#2548)

* fix ctrl_c problem on windows

* updated cargo.lock
This commit is contained in:
Darren Schroeder 2020-09-15 09:59:51 -05:00 committed by GitHub
parent 232aca76a4
commit 04451af776
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

4
Cargo.lock generated
View File

@ -4196,9 +4196,9 @@ dependencies = [
[[package]]
name = "rawkey"
version = "0.1.2"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ec17a493dcb820725c002bc253f6f3ba4e4dc635e72c238540691b05e43897"
checksum = "7ad6efac35ef044d565b23f0d111d76aa21ab2e86934b1225f7071d42e58ebad"
dependencies = [
"readkey",
"user32-sys",

View File

@ -755,7 +755,7 @@ pub async fn cli(
LineResult::CtrlC => {
let config_ctrlc_exit = config::config(Tag::unknown())?
.get("ctrlc_exit")
.map(|s| s.value.expect_string() == "true")
.map(|s| s.value.is_true())
.unwrap_or(false); // default behavior is to allow CTRL-C spamming similar to other shells
if !config_ctrlc_exit {