From 87130d327f4472c1b8025e1802dd76c45f57c43f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=BDubo=C5=A1=20Pinte=C5=A1?= Date: Fri, 7 Oct 2022 09:55:30 +0200 Subject: [PATCH] Fix separator between import path and directory. On windows, ":" is problematic because it separates drive letter from path. Thus I changed the separator to "@". This at leas fixed Courtney on Windows. --- patsy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patsy.go b/patsy.go index 4a790d7..8dbacc1 100644 --- a/patsy.go +++ b/patsy.go @@ -81,7 +81,7 @@ func Dirs(env vos.Env, packagePath string) (map[string]string, error) { return nil, errors.WithStack(err) } - exe := exec.Command("go", "list", "-f", "{{.ImportPath}}:{{.Dir}}", packagePath) + exe := exec.Command("go", "list", "-f", "{{.ImportPath}}@{{.Dir}}", packagePath) exe.Dir = wd exe.Env = env.Environ() out, err := exe.CombinedOutput() @@ -98,7 +98,7 @@ func Dirs(env vos.Env, packagePath string) (map[string]string, error) { continue } - chunks := strings.Split(strings.TrimSpace(line), ":") + chunks := strings.Split(strings.TrimSpace(line), "@") importPath := chunks[0] dir := chunks[1]