mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-11 22:10:09 +01:00
fix: interrupt inquire to exit
This commit is contained in:
parent
7a45532802
commit
050a71a502
3 changed files with 6 additions and 2 deletions
|
|
@ -155,7 +155,7 @@ pub fn cnf(data: &mut Data) {
|
|||
.with_render_config(render_config)
|
||||
.without_filtering()
|
||||
.prompt()
|
||||
.unwrap();
|
||||
.unwrap_or_else(|_| std::process::exit(1));
|
||||
|
||||
// retry after installing package
|
||||
if system::install_package(data, &package_manager, &package) {
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ pub fn select_candidate(data: &mut Data) {
|
|||
.without_help_message()
|
||||
.with_render_config(render_config)
|
||||
.prompt()
|
||||
.unwrap();
|
||||
.unwrap_or_else(|_| exit(1));
|
||||
let pos = highlight_candidates.iter().position(|x| x == &ans).unwrap();
|
||||
let suggestion = candidates[pos].to_string();
|
||||
data.update_suggest(&suggestion);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue