Skip to content

Commit

Permalink
fix: add required annotation to data flags (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
k3llymariee authored May 21, 2024
1 parent 7c7925d commit 72a3a92
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/resources/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ func (op *OperationCmd) initFlags() error {
if err != nil {
return err
}
err = op.cmd.Flags().SetAnnotation(cliflags.DataFlag, "required", []string{"true"})
if err != nil {
return err
}
}
err := viper.BindPFlag(cliflags.DataFlag, op.cmd.Flags().Lookup(cliflags.DataFlag))
if err != nil {
Expand Down

0 comments on commit 72a3a92

Please sign in to comment.