diff --git a/internal/cmd/stack/list.go b/internal/cmd/stack/list.go index 5aee03c..75c7f3a 100644 --- a/internal/cmd/stack/list.go +++ b/internal/cmd/stack/list.go @@ -3,6 +3,7 @@ package stack import ( "context" "fmt" + "math" "slices" "strings" @@ -26,6 +27,10 @@ func listStacks() cli.ActionFunc { return fmt.Errorf("limit must be greater than 0") } + if cliCtx.Uint(flagLimit.Name) >= math.MaxInt32 { + return fmt.Errorf("limit must be less than %d", math.MaxInt32) + } + limit = internal.ToPtr(cliCtx.Uint(flagLimit.Name)) }