mirror of
https://github.com/go-kratos/kratos.git
synced 2025-03-17 21:07:54 +02:00
fix(cmd): modify the problem of getting length error of kratos run command array (#1150)
This commit is contained in:
parent
a7a8d5d91a
commit
1ef817507a
@ -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…
x
Reference in New Issue
Block a user