fix: fix kratos run when cmd number is one (#1956)

status-code-override
haiyux 3 years ago committed by chenzhihui
parent 572270ba91
commit eaa5b161b4
  1. 4
      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") fmt.Fprintf(os.Stderr, "\033[31mERROR: %s\033[m\n", "The cmd directory cannot be found in the current directory")
return return
} else if len(cmdPath) == 1 { } else if len(cmdPath) == 1 {
for k, v := range cmdPath { for _, v := range cmdPath {
dir = path.Join(v, k) dir = v
} }
} else { } else {
var cmdPaths []string var cmdPaths []string

Loading…
Cancel
Save