From 7b8c2c232f5ce551814b4da2200d6a2397af0ed1 Mon Sep 17 00:00:00 2001 From: ahkrr <44893716+ahkrr@users.noreply.github.com> Date: Mon, 8 Mar 2021 00:08:37 +0100 Subject: [PATCH] fix: deadlock when printing errors (#3140) Co-authored-by: hk --- README.md | 2 +- crates/nu-command/src/script.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5507074d93..75292e5c80 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,7 @@ Nu has early support for configuring the shell. You can refer to the book for a To set one of these variables, you can use `config set`. For example: ```shell -> config set edit_mode "vi" +> config set line_editor.edit_mode "vi" > config set path $nu.path ``` diff --git a/crates/nu-command/src/script.rs b/crates/nu-command/src/script.rs index cd14f59e26..1cf192c8a8 100644 --- a/crates/nu-command/src/script.rs +++ b/crates/nu-command/src/script.rs @@ -257,9 +257,7 @@ pub async fn run_script_standalone( } LineResult::Error(line, err) => { - context.with_host(|_host| { - print_err(err, &Text::from(line.clone()), &context); - }); + print_err(err, &Text::from(line.clone()), &context); maybe_print_errors(&context, Text::from(line)); if exit_on_error {