Skip to content

Commit fb10d7d

Browse files
authored
internal/util/projutil/project_util.go: fix repo lookup when CWD is $GOPATH (#1432)
1 parent aa1918a commit fb10d7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/util/projutil/project_util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func CheckAndGetProjectGoPkg() string {
142142
gopath := MustSetGopath(MustGetGopath())
143143
goSrc := filepath.Join(gopath, SrcDir)
144144
wd := MustGetwd()
145-
currPkg := strings.Replace(wd, goSrc+fsep, "", 1)
145+
currPkg := strings.Replace(wd, goSrc, "", 1)
146146
// strip any "/" prefix from the repo path.
147147
return strings.TrimPrefix(currPkg, fsep)
148148
}

0 commit comments

Comments
 (0)