commit | 125c5259d939c46941829c2a3625ae73590f613a | [log] [tgz] |
---|---|---|
author | Ryuji Iwata <qt.luigi@gmail.com> | Sat Jan 20 22:30:55 2018 +0900 |
committer | Elias Naur <elias.naur@gmail.com> | Sat Jan 20 19:27:59 2018 +0000 |
tree | aa15f08f49a251345432a39f7422f3d7fa5d2879 | |
parent | 64951f83ad165e7761f4edfdd68e2170f6cc9abb [diff] |
cmd/gomobile: improve Xcode check Since the xcrun binary exists in macOS from the beginning, it can not be used to check that Xcode is available. The xcodebuild command does not return an error if Xcode is available. Reference https://go-review.googlesource.com/c/mobile/+/35852 Change-Id: Ibb6324a2d801eab47b3544c50ee1cdbc36b608bc Reviewed-on: https://go-review.googlesource.com/88755 Reviewed-by: Elias Naur <elias.naur@gmail.com>
diff --git a/cmd/gomobile/env.go b/cmd/gomobile/env.go index c564a43..a87c332 100644 --- a/cmd/gomobile/env.go +++ b/cmd/gomobile/env.go
@@ -371,6 +371,6 @@ } func xcodeAvailable() bool { - _, err := exec.LookPath("xcrun") + err := exec.Command("xcrun", "xcodebuild", "-version").Run() return err == nil }