]> Cypherpunks repositories - gostls13.git/commit
cmd/dist: make dir check in defaulttarg() more robust
authorShenghou Ma <minux.ma@gmail.com>
Fri, 17 Feb 2012 16:29:34 +0000 (11:29 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 17 Feb 2012 16:29:34 +0000 (11:29 -0500)
commit710d0540e27f57b2589552965418b95b88187fa7
tree4551ca8dae04afbe78fc71ed9fe4a5d05d8b1303
parentfc444ebac1521b4f36a70c0e1b19c2e78cf5520f
cmd/dist: make dir check in defaulttarg() more robust

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
src/cmd/dist/build.c