• Russ Cox's avatar
    cmd/go: adjust default GOROOT to prefer runtime.GOROOT() spelling · eac6fe08
    Russ Cox authored
    If runtime.GOROOT() and the os.Executable method for finding GOROOT
    find the same directory but with different spellings, prefer the spelling
    returned by runtime.GOROOT().
    
    This avoids an inconsistency if "pwd" returns one spelling but a
    different spelling is used in $PATH (and therefore in os.Executable()).
    make.bash runs with GOROOT=$(cd .. && pwd); the goal is to allow
    the resulting toolchain to use that default setting (unless moved)
    even if the directory spelling is different in $PATH.
    
    Change-Id: If96b28b9e8697f4888f153a400b40bbf58a9128b
    Reviewed-on: https://go-review.googlesource.com/74250
    Run-TryBot: Russ Cox <rsc@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
    eac6fe08
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...