From eed22605ef9485230e10b64ce61b0480beca674b Mon Sep 17 00:00:00 2001 From: JT <547158+jntrnr@users.noreply.github.com> Date: Sat, 4 Dec 2021 18:24:38 +1300 Subject: [PATCH] Fix the failure if the prompt breaks (#426) --- src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index e1fbc4ad45..467fe48656 100644 --- a/src/main.rs +++ b/src/main.rs @@ -406,9 +406,8 @@ fn update_prompt<'prompt>( let config = stack.get_config().unwrap_or_default(); pipeline_data.collect_string("", &config) } - Err(err) => { - let working_set = StateWorkingSet::new(engine_state); - report_error(&working_set, &err); + Err(..) => { + // If we can't run the custom prompt, give them the default return default_prompt as &dyn Prompt; } };