fix(cmd): modify the problem of getting length error of kratos run command array (#1150)

pull/1154/head
包子 4 years ago committed by GitHub
parent a7a8d5d91a
commit 1ef817507a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      cmd/kratos/internal/run/run.go

@ -39,10 +39,10 @@ func Run(cmd *cobra.Command, args []string) {
fmt.Fprintf(os.Stderr, "\033[31mERROR: %s\033[m\n", err)
return
}
if len(cmdDir) == 0 {
if len(cmdPath) == 0 {
fmt.Fprintf(os.Stderr, "\033[31mERROR: %s\033[m\n", "The cmd directory cannot be found in the current directory")
return
} else if len(cmdDir) == 1 {
} else if len(cmdPath) == 1 {
dir = path.Join(cmdDir, cmdPath[0])
} else {
prompt := &survey.Select{

Loading…
Cancel
Save