diff --git a/client/snapshot/list.go b/client/snapshot/list.go index 43ff31cfd4a..1d564c44f5c 100644 --- a/client/snapshot/list.go +++ b/client/snapshot/list.go @@ -23,6 +23,11 @@ var ListSnapshotsCmd = &cobra.Command{ if err != nil { return fmt.Errorf("failed to list snapshots: %w", err) } + + if len(snapshots) == 0 { + cmd.Println("no snapshots found") + } + for _, snapshot := range snapshots { cmd.Println("height:", snapshot.Height, "format:", snapshot.Format, "chunks:", snapshot.Chunks) } diff --git a/server/v2/store/snapshot.go b/server/v2/store/snapshot.go index c9e8c308c27..0fa2b67c708 100644 --- a/server/v2/store/snapshot.go +++ b/server/v2/store/snapshot.go @@ -127,6 +127,11 @@ func (s *Server[T]) ListSnapshotsCmd() *cobra.Command { if err != nil { return fmt.Errorf("failed to list snapshots: %w", err) } + + if len(snapshots) == 0 { + cmd.Println("no snapshots found") + } + for _, snapshot := range snapshots { cmd.Println("height:", snapshot.Height, "format:", snapshot.Format, "chunks:", snapshot.Chunks) }