mirror of
https://github.com/golang/go
synced 2024-11-18 20:04:52 -07:00
runtime: handle empty environment variables on Plan 9
LGTM=bradfitz, rsc R=rsc, bradfitz CC=golang-codereviews https://golang.org/cl/137920044
This commit is contained in:
parent
3306d119b0
commit
b3f224b280
@ -31,6 +31,10 @@ func gogetenv(key string) string {
|
||||
return ""
|
||||
}
|
||||
n := seek(fd, 0, 2) - 1
|
||||
if n <= 0 {
|
||||
close(fd)
|
||||
return ""
|
||||
}
|
||||
|
||||
p := make([]byte, n)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user