Commit 9adf6846 authored by Russ Cox's avatar Russ Cox

cmd/go: fix TestVendorRun when $GOROOT is inside a symlinked path

Fixes #11305.

Change-Id: Icaa3a009aa4ab214c9aaf74f52c3e622fa266a9d
Reviewed-on: https://go-review.googlesource.com/12194Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
parent 4325a9ee
......@@ -188,7 +188,11 @@ func (tg *testgoData) cd(dir string) {
if tg.wd == "" {
tg.wd = tg.pwd()
}
abs, err := filepath.Abs(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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment