]> Cypherpunks repositories - gostls13.git/commitdiff
misc/ios: fix an error when getenv encounters unset variable
authorMichael Matloob <matloob@golang.org>
Mon, 2 Nov 2015 22:37:31 +0000 (17:37 -0500)
committerMichael Matloob <matloob@golang.org>
Tue, 3 Nov 2015 15:17:35 +0000 (15:17 +0000)
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>
misc/ios/go_darwin_arm_exec.go

index debd2cdb3062bb94c97689bee497db28fadafdd2..4d658e770c325aa2bf6b9c940c40f58769ed51b7 100644 (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
 }