1
0
mirror of https://github.com/golang/go synced 2024-11-18 20:04:52 -07:00

go.tools/dashboard/builder: use $home on Plan 9

LGTM=alex.brainman
R=golang-codereviews, lucio.dere, alex.brainman
CC=golang-codereviews
https://golang.org/cl/64520043
This commit is contained in:
David du Colombier 2014-02-16 17:40:50 +01:00
parent a565a4ff67
commit 0b0cd8b22c

View File

@ -203,9 +203,12 @@ func NewBuilder(goroot *Repo, name string) (*Builder, error) {
// read keys from keyfile // read keys from keyfile
fn := "" fn := ""
if runtime.GOOS == "windows" { switch runtime.GOOS {
case "plan9":
fn = os.Getenv("home")
case "windows":
fn = os.Getenv("HOMEDRIVE") + os.Getenv("HOMEPATH") fn = os.Getenv("HOMEDRIVE") + os.Getenv("HOMEPATH")
} else { default:
fn = os.Getenv("HOME") fn = os.Getenv("HOME")
} }
fn = filepath.Join(fn, ".gobuildkey") fn = filepath.Join(fn, ".gobuildkey")