mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-23 09:00:20 +08:00
(goctl): fix quickstart error while reading go module info (#4297)
This commit is contained in:
parent
64e3aeda55
commit
da2c14d45f
@ -56,12 +56,8 @@ func initProject() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
log.Must(pathx.MkdirIfNotExist(projectDir))
|
log.Must(pathx.MkdirIfNotExist(projectDir))
|
||||||
if hasGoMod, _ := ctx.IsGoMod(projectDir); hasGoMod {
|
_, err = ctx.Prepare(projectDir)
|
||||||
return
|
logx.Must(err)
|
||||||
}
|
|
||||||
if exitCode := execCommand(projectDir, "go mod init "+baseDir); exitCode != 0 {
|
|
||||||
log.Fatalln("Init process exit")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func run(_ *cobra.Command, _ []string) error {
|
func run(_ *cobra.Command, _ []string) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user