1
0
mirror of https://github.com/nushell/nushell.git synced 2025-07-10 19:37:16 +02:00

Ctrl c exit issue ()

* 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
2 changed files with 3 additions and 3 deletions
Cargo.lock
crates/nu-cli/src

4
Cargo.lock generated

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

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