Skip to content
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
4 changes: 2 additions & 2 deletions cmd/fsck/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading