Skip to content

Commit

Permalink
Refactor list command to handle secret limit constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
h0n9 committed May 3, 2024
1 parent 17735da commit fd3f569
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cli/secrets/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ var listCmd = &cobra.Command{
secretProvider provider.SecretProvider
)

// check constraints
if listSecretsLimit <= 0 {
return fmt.Errorf("'--limit' flag value must be greater than 0")
}

// init ctx
ctx := context.Background()

Expand Down

0 comments on commit fd3f569

Please sign in to comment.