fix: fix go import path when add project --nomod (#2837)

pull/2841/head
haiyux 2 years ago committed by GitHub
parent 1d50f50262
commit 96480c11ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      cmd/kratos/internal/project/project.go

@ -83,6 +83,8 @@ func run(_ *cobra.Command, args []string) {
if e != nil {
panic(e)
}
// Get the relative path for adding a project based on Go modules
p.Path = filepath.Join(strings.TrimPrefix(workingDir, projectRoot+"/"), p.Name)
done <- p.Add(ctx, workingDir, repoURL, branch, mod)
}()
select {

Loading…
Cancel
Save