Skip to content

Commit

Permalink
[cmd] add completions for collect, validate collect args
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienthebo authored and csweichel committed Jan 12, 2023
1 parent c7c8c5d commit 3bad410
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/collect.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ type variantDescription struct {

// collectCmd represents the collect command
var collectCmd = &cobra.Command{
Use: "collect [components|packages|scripts|files]",
Short: "Collects all packages in a workspace",
Args: cobra.MaximumNArgs(1),
Use: "collect [components|packages|scripts|files]",
Short: "Collects all packages in a workspace",
Args: cobra.MatchAll(cobra.OnlyValidArgs, cobra.MaximumNArgs(1)),
ValidArgs: []string{"components", "packages", "scripts", "scripts", "files"},
Run: func(cmd *cobra.Command, args []string) {
workspace, err := getWorkspace()
if err != nil {
Expand Down

0 comments on commit 3bad410

Please sign in to comment.