We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a6fd8a4 commit 3205598Copy full SHA for 3205598
1 file changed
cmd/fsck/main.go
@@ -98,19 +98,19 @@ func main() {
98
99
checkResult <- err
100
close(checkResult)
101
+ cancel() // We're done, so we can exit.
102
}()
103
104
if *ui {
105
if err := tui.RunApp(ctx, f); err != nil {
106
slog.ErrorContext(ctx, "App exited", slog.Any("error", err))
107
}
- // User may have exited the UI, cancel the context to signal to everything else.
108
+ // User may have exited the UI, cancel the context to signal to the async fsck process too.
109
cancel()
110
} else {
111
for {
112
select {
113
case err := <-checkResult:
- cancel()
114
if err != nil {
115
slog.ErrorContext(ctx, "fsck failed", slog.Any("error", err))
116
os.Exit(1)
0 commit comments