Skip to content

Commit

Permalink
fix: graceful no docker exit (#310)
Browse files Browse the repository at this point in the history
This shuts down the app via a normal path and doesn't interfere with the
terminal.
  • Loading branch information
brianp committed Feb 7, 2024
1 parent 6dbadd4 commit e4aae3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/src/dashboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ impl Actor for Dashboard {
wait_for_keypress();
println!();
println!();
std::process::exit(0);
self.finalize(ctx).await?;
}

self.connect_to_bus()?;
Expand All @@ -147,6 +147,7 @@ impl Actor for Dashboard {
}

async fn finalize(&mut self, _ctx: &mut ActorContext<Self>) -> Result<(), Error> {
// Here ctx
disable_raw_mode()?;
let mut terminal = self.terminal.take().ok_or_else(|| DashboardError::Terminal)?;
execute!(terminal.backend_mut(), LeaveAlternateScreen)?;
Expand Down

0 comments on commit e4aae3f

Please sign in to comment.