mirror of https://github.com/golang/go.git
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:
parent
e3e0122ae2
commit
48155f5440
|
|
@ -103,7 +103,7 @@ func main() {
|
||||||
func getenv(envvar string) string {
|
func getenv(envvar string) string {
|
||||||
s := os.Getenv(envvar)
|
s := os.Getenv(envvar)
|
||||||
if s == "" {
|
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
|
return s
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue