Skip to content

Commit bdb5b2c

Browse files
committed
ctr: Return error if task.Metrics fails
Signed-off-by: Li Yuxuan <[email protected]>
1 parent d43d546 commit bdb5b2c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cmd/ctr/commands/tasks/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ var metricsCommand = cli.Command{
7373
}
7474
metric, err := task.Metrics(ctx)
7575
if err != nil {
76-
return nil
76+
return err
7777
}
7878
anydata, err := typeurl.UnmarshalAny(metric.Data)
7979
if err != nil {

0 commit comments

Comments
 (0)