• Shenghou Ma's avatar
    cmd/dist: make dir check in defaulttarg() more robust · 710d0540
    Shenghou Ma authored
    1, strip last path separator from $GOROOT
       The user might define GOROOT=/path/to/go/, but then the dir
       check in defaulttarg() will always complain the current dir
       is not within $GOROOT/src/.
    2, resolve symlinks in the default goroot
       Or if getcwd() returns a fully-resolved path, the check in
       defaulttarg() will always fail.
    
    R=rsc
    CC=golang-dev
    https://golang.org/cl/5649073
    710d0540
build.c 32.8 KB