From 3205598e2e513f006feddcb014b8cda57b1630b1 Mon Sep 17 00:00:00 2001 From: Al Cutter Date: Tue, 19 May 2026 13:57:06 +0100 Subject: [PATCH] Fix fsck not exiting in TUI mode --- cmd/fsck/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/fsck/main.go b/cmd/fsck/main.go index 9f0ea83a8..0827ea456 100644 --- a/cmd/fsck/main.go +++ b/cmd/fsck/main.go @@ -98,19 +98,19 @@ func main() { checkResult <- err close(checkResult) + cancel() // We're done, so we can exit. }() if *ui { if err := tui.RunApp(ctx, f); err != nil { slog.ErrorContext(ctx, "App exited", slog.Any("error", err)) } - // User may have exited the UI, cancel the context to signal to everything else. + // User may have exited the UI, cancel the context to signal to the async fsck process too. cancel() } else { for { select { case err := <-checkResult: - cancel() if err != nil { slog.ErrorContext(ctx, "fsck failed", slog.Any("error", err)) os.Exit(1)