mirror of
https://github.com/golang/go
synced 2024-11-23 06:00:08 -07:00
cmd/go: fix TestVendorRun when $GOROOT is inside a symlinked path
Fixes #11305. Change-Id: Icaa3a009aa4ab214c9aaf74f52c3e622fa266a9d Reviewed-on: https://go-review.googlesource.com/12194 Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
4325a9ee2a
commit
9adf684686
@ -188,7 +188,11 @@ func (tg *testgoData) cd(dir string) {
|
|||||||
if tg.wd == "" {
|
if tg.wd == "" {
|
||||||
tg.wd = tg.pwd()
|
tg.wd = tg.pwd()
|
||||||
}
|
}
|
||||||
|
abs, err := filepath.Abs(dir)
|
||||||
tg.must(os.Chdir(dir))
|
tg.must(os.Chdir(dir))
|
||||||
|
if err == nil {
|
||||||
|
tg.setenv("PWD", abs)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// sleep sleeps for one tick, where a tick is a conservative estimate
|
// sleep sleeps for one tick, where a tick is a conservative estimate
|
||||||
|
Loading…
Reference in New Issue
Block a user