From eaa5b161b4c933de8d769b12b8cd89ee95b58279 Mon Sep 17 00:00:00 2001 From: haiyux Date: Wed, 27 Apr 2022 10:36:40 +0800 Subject: [PATCH] fix: fix kratos run when cmd number is one (#1956) --- cmd/kratos/internal/run/run.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/kratos/internal/run/run.go b/cmd/kratos/internal/run/run.go index 905f4ea55..556af54b4 100644 --- a/cmd/kratos/internal/run/run.go +++ b/cmd/kratos/internal/run/run.go @@ -42,8 +42,8 @@ func Run(cmd *cobra.Command, args []string) { fmt.Fprintf(os.Stderr, "\033[31mERROR: %s\033[m\n", "The cmd directory cannot be found in the current directory") return } else if len(cmdPath) == 1 { - for k, v := range cmdPath { - dir = path.Join(v, k) + for _, v := range cmdPath { + dir = v } } else { var cmdPaths []string