Skip to content

Commit 7846726

Browse files
committed
OCM-2093 | fix: check eventual error raised by tabwriter's flush operation
1 parent 95039b0 commit 7846726

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cmd/ocm/list/user/cmd.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@ func run(cmd *cobra.Command, argv []string) error {
100100
}
101101
}
102102

103-
// flush ONCE at the end
104-
writer.Flush()
103+
err = writer.Flush()
104+
if err != nil {
105+
return fmt.Errorf("Failed to flush user output for cluster '%s': %v", clusterKey, err)
106+
}
105107

106108
return nil
107109
}

0 commit comments

Comments
 (0)