fix: windows path failed where use --nomod

fix/windows_path
haiyux 2 years ago
parent 96480c11ee
commit a9754b1688
  1. 2
      cmd/kratos/internal/project/project.go

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

Loading…
Cancel
Save