From cfee151d4e03aea6e133e0ec2b4658ac3275d283 Mon Sep 17 00:00:00 2001 From: ammkrn <46387933+ammkrn@users.noreply.github.com> Date: Mon, 3 May 2021 22:50:38 -0500 Subject: [PATCH] Dont unwrap rustyline helper in cli (#3382) If nu fails to load a user config on startup, no helper is set and the later call to `rl.helper_mut()` will panic. There may be better ways to handle this long-term, but printing an error about the failure to parse the config and then starting with default values seems reasonable. --- crates/nu-cli/src/cli.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/nu-cli/src/cli.rs b/crates/nu-cli/src/cli.rs index 698411776..30eb066be 100644 --- a/crates/nu-cli/src/cli.rs +++ b/crates/nu-cli/src/cli.rs @@ -301,7 +301,9 @@ pub fn cli(context: EvaluationContext, options: Options) -> Result<(), Box