Skip to content

Commit

Permalink
Provide better instructions on the kit create command for missing name
Browse files Browse the repository at this point in the history
Fixes #932.
  • Loading branch information
dobozysaurus authored and astefanutti committed Sep 10, 2019
1 parent 4688ad8 commit 7f7d15f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/cmd/kit_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package cmd
import (
"errors"
"fmt"
"strconv"
"strings"

"github.com/apache/camel-k/pkg/trait"
Expand All @@ -41,7 +40,7 @@ func newKitCreateCmd(rootCmdOptions *RootCmdOptions) *cobra.Command {
}

cmd := cobra.Command{
Use: "create",
Use: "create <name>",
Short: "Create an Integration Kit",
Long: `Create an Integration Kit.`,
Args: impl.validateArgs,
Expand Down Expand Up @@ -76,7 +75,7 @@ type kitCreateCommand struct {

func (command *kitCreateCommand) validateArgs(_ *cobra.Command, args []string) error {
if len(args) != 1 {
return errors.New("accepts 1 arg, received " + strconv.Itoa(len(args)))
return errors.New("create expects a single name argument")
}

return nil
Expand Down

0 comments on commit 7f7d15f

Please sign in to comment.