fix: deadlock when printing errors (#3140)

Co-authored-by: hk <alexhaka10@protonmail.com>
This commit is contained in:
ahkrr 2021-03-08 00:08:37 +01:00 committed by GitHub
parent 15e1e6376b
commit 7b8c2c232f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -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: To set one of these variables, you can use `config set`. For example:
```shell ```shell
> config set edit_mode "vi" > config set line_editor.edit_mode "vi"
> config set path $nu.path > config set path $nu.path
``` ```

View File

@ -257,9 +257,7 @@ pub async fn run_script_standalone(
} }
LineResult::Error(line, err) => { 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)); maybe_print_errors(&context, Text::from(line));
if exit_on_error { if exit_on_error {