Fix the failure if the prompt breaks (#426)

This commit is contained in:
JT 2021-12-04 18:24:38 +13:00 committed by GitHub
parent 8cf4402e6c
commit eed22605ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}
};