cmd/gomobile: print stderr on xcrun failure
The stderr includes a helpful note from Xcode about how to fix it. Fixes golang/go#12515 Change-Id: I4eb944f29a7a3e39e2f4150c27a53e04d02e5d09 Reviewed-on: https://go-review.googlesource.com/15300 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
parent
c3c5f8745b
commit
560c1bec66
@ -175,14 +175,14 @@ func envClang(sdkName string) (clang, cflags string, err error) {
|
||||
return "clang-" + sdkName, "-isysroot=" + sdkName, nil
|
||||
}
|
||||
cmd := exec.Command("xcrun", "--sdk", sdkName, "--find", "clang")
|
||||
out, err := cmd.Output()
|
||||
out, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
return "", "", fmt.Errorf("xcrun --find: %v\n%s", err, out)
|
||||
}
|
||||
clang = strings.TrimSpace(string(out))
|
||||
|
||||
cmd = exec.Command("xcrun", "--sdk", sdkName, "--show-sdk-path")
|
||||
out, err = cmd.Output()
|
||||
out, err = cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
return "", "", fmt.Errorf("xcrun --show-sdk-path: %v\n%s", err, out)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user