Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Dec 19, 2024
1 parent a1c45da commit 590311c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client/snapshot/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
5 changes: 5 additions & 0 deletions server/v2/store/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 590311c

Please sign in to comment.