Skip to content

Commit e44abf3

Browse files
fix:index out of bound for get projects cmd (#184)
Signed-off-by: Shivam Purohit <[email protected]>
1 parent bed5b0c commit e44abf3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/cmd/get/projects.go

+5
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ var projectsCmd = &cobra.Command{
6060
end = totalProjects
6161

6262
}
63+
// check if there are no more projects to display
64+
if start >= totalProjects {
65+
utils.Red.Println("No more projects to display")
66+
break
67+
}
6368

6469
// displaying the projects for the current page
6570
writer := tabwriter.NewWriter(os.Stdout, 8, 8, 8, '\t', tabwriter.AlignRight)

0 commit comments

Comments
 (0)