Skip to content

Commit

Permalink
[PLAT-15368][YBA CLI]Backup list print "No more backup present" after…
Browse files Browse the repository at this point in the history
… printing all the backups in -o pretty/json

Summary: Don't print `No more backups` for output types json and pretty

Test Plan: Manually test the workflow

Reviewers: skurapati

Reviewed By: skurapati

Subscribers: yugaware

Differential Revision: https://phorge.dev.yugabyte.com/D38195
  • Loading branch information
Deepti-yb committed Sep 19, 2024
1 parent b32222d commit c6521cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion managed/yba-cli/cmd/backup/list_backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ var listBackupCmd = &cobra.Command{
// Check if there are more pages
hasNext := r.GetHasNext()
if !hasNext {
logrus.Infoln("No more backups present\n")
if util.IsOutputType(formatter.TableFormatKey) {
logrus.Infoln("No more backups present\n")
}
break
}

Expand Down
4 changes: 3 additions & 1 deletion managed/yba-cli/cmd/backup/restore/list_restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ var listRestoreCmd = &cobra.Command{
// Check if there are more pages
hasNext := r.GetHasNext()
if !hasNext {
logrus.Infoln("No more restores present\n")
if util.IsOutputType(formatter.TableFormatKey) {
logrus.Infoln("No more restores present\n")
}
break
}

Expand Down

0 comments on commit c6521cf

Please sign in to comment.