fix: root path on windows bug (#34)
* rebase upstream * rebase * trim no need line * trim no need line * trim no need line * fix bug on windows Co-authored-by: kingxt <dream4kingxt@163.com>
This commit is contained in:
@@ -61,7 +61,7 @@ func FindGoModPath(dir string) (string, bool) {
|
|||||||
for {
|
for {
|
||||||
if FileExists(filepath.Join(tempPath, goModeIdentifier)) {
|
if FileExists(filepath.Join(tempPath, goModeIdentifier)) {
|
||||||
tempPath = filepath.Dir(tempPath)
|
tempPath = filepath.Dir(tempPath)
|
||||||
rootPath = absDir[len(tempPath)+1:]
|
rootPath = strings.TrimPrefix(absDir[len(tempPath):], "/")
|
||||||
hasGoMod = true
|
hasGoMod = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user