diff --git a/cmd/kratos/internal/proto/add/add.go b/cmd/kratos/internal/proto/add/add.go index 88433dc75..e770dd5fb 100644 --- a/cmd/kratos/internal/proto/add/add.go +++ b/cmd/kratos/internal/proto/add/add.go @@ -20,7 +20,10 @@ var CmdAdd = &cobra.Command{ } func run(cmd *cobra.Command, args []string) { - // kratos proto add helloworld/v1/helloworld.proto + if len(args) == 0 { + fmt.Println("Please enter the proto file or directory") + return + } input := args[0] n := strings.LastIndex(input, "/") if n == -1 {