Skip to content

Commit e40bd19

Browse files
mateusz834gopherbot
authored andcommitted
go/packages: use cfg.abs(dir) in determineRootDirsModules
As determineRootDirsModules calls go list with a custom working directory, relative paths that it produces should also be treated relative to that directory (cfg.Dir). Change-Id: I07e162a9119a4d36162e69702150e63acf96f207 Reviewed-on: https://go-review.googlesource.com/c/tools/+/680819 Reviewed-by: Alan Donovan <[email protected]> Reviewed-by: Robert Findley <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Alan Donovan <[email protected]> Commit-Queue: Alan Donovan <[email protected]>
1 parent f17f523 commit e40bd19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

go/packages/golist_overlay.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func (state *golistState) determineRootDirsModules() (map[string]string, error)
5555
}
5656
if mod.Dir != "" && mod.Path != "" {
5757
// This is a valid module; add it to the map.
58-
absDir, err := filepath.Abs(mod.Dir)
58+
absDir, err := state.cfg.abs(mod.Dir)
5959
if err != nil {
6060
return nil, err
6161
}

0 commit comments

Comments
 (0)