Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spin watch Ctrl+C not working before first successful build #2991

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/commands/watch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl WatchCommand {
clear_screen: self.clear,
has_ever_built: false,
watched_changes: source_code_rx,
uppificator_pauser: pause_tx,
uppificator_pauser: pause_tx.clone(),
};

let mut uppificator = Uppificator {
Expand Down Expand Up @@ -205,7 +205,9 @@ impl WatchCommand {
// break out its run loop. This will cause the `uppificator_handle` future to
// complete, which will cause the select to return.
_ = ctrlc::set_handler(move || {
_ = stop_tx.send(Uuid::new_v4());
let _ = stop_tx.send(Uuid::new_v4());
// Make sure the loop that processes the stop signal sees it
let _ = futures::executor::block_on(pause_tx.send(Pause::Unpause));
});

// As noted above, the most likely future to complete is the uppificator on a Ctrl+C.
Expand Down
Loading