Skip to content

Commit ce623a5

Browse files
0introbradfitz
authored andcommitted
cmd/buildlet: fix homedir on Plan 9
On Plan 9, the home environment variable contains the user's home directory. Updates golang/go#21191 Change-Id: Ia421aebe5b3cfec6a2baa1bb7972183c8be19b97 Reviewed-on: https://go-review.googlesource.com/53473 Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent ddefd9f commit ce623a5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/buildlet/reverse.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,11 @@ func devBuilderKey(builder string) string {
260260
}
261261

262262
func homedir() string {
263-
if runtime.GOOS == "windows" {
263+
switch runtime.GOOS {
264+
case "windows":
264265
return os.Getenv("HOMEDRIVE") + os.Getenv("HOMEPATH")
266+
case "plan9":
267+
return os.Getenv("home")
265268
}
266269
home := os.Getenv("HOME")
267270
if home != "" {

0 commit comments

Comments
 (0)