1
0
mirror of https://github.com/golang/go synced 2024-11-22 23:40:02 -07:00

misc/ios: fix an error when getenv encounters unset variable

The error message should indicate the name of the unset variable,
rather than the value. The value will alwayse be empty.

Change-Id: I6f6c165074dfce857b6523703a890d205423cd28
Reviewed-on: https://go-review.googlesource.com/16555
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Michael Matloob 2015-11-02 17:37:31 -05:00
parent e3e0122ae2
commit 48155f5440

View File

@ -103,7 +103,7 @@ func main() {
func getenv(envvar string) string {
s := os.Getenv(envvar)
if s == "" {
log.Fatalf("%s not set\nrun $GOROOT/misc/ios/detect.go to attempt to autodetect", s)
log.Fatalf("%s not set\nrun $GOROOT/misc/ios/detect.go to attempt to autodetect", envvar)
}
return s
}