From: Michael Matloob Date: Mon, 2 Nov 2015 22:37:31 +0000 (-0500) Subject: misc/ios: fix an error when getenv encounters unset variable X-Git-Tag: go1.6beta1~652 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=48155f5440ab4ffb2e3c31646cecb504af735ff5;p=gostls13.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 --- diff --git a/misc/ios/go_darwin_arm_exec.go b/misc/ios/go_darwin_arm_exec.go index debd2cdb30..4d658e770c 100644 --- a/misc/ios/go_darwin_arm_exec.go +++ b/misc/ios/go_darwin_arm_exec.go @@ -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 }