Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide better instructions on the kit create command for missing nam… #932

Merged
merged 3 commits into from
Sep 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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