Skip to content

Commit

Permalink
cmd/go: fix TestVendorRun when $GOROOT is inside a symlinked path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rsc committed Jul 15, 2015
1 parent 4325a9e commit 9adf684
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cmd/go/go_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9adf684

Please sign in to comment.