Skip to content

Commit

Permalink
Merge pull request #158 from popzxc/fix-ctrlc
Browse files Browse the repository at this point in the history
Exit on ctrl+c
  • Loading branch information
pksunkara authored Jul 17, 2024
2 parents 15064eb + 4c9f172 commit 0015d20
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cargo-workspaces/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ fn set_handlers() {
ctrlc::set_handler(move || {
let term = dialoguer::console::Term::stdout();
let _ = term.show_cursor();
// Mimic normal `Ctrl-C` exit code.
std::process::exit(130);
})
.expect("Error setting Ctrl-C handler");
}

0 comments on commit 0015d20

Please sign in to comment.