cmd/gomobile: improve error message if gomobile hasn't inited
gomobile init builds and install the toolchain for iOS builds now. The error message shouldn't exclude the darwin/arm and darwin/arm64 related initialization. Change-Id: Iebd5d7fb1466d9be694d8848c0fd8fa782850c79 Reviewed-on: https://go-review.googlesource.com/11239 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
parent
8fff803af0
commit
df4a6521ad
@ -357,15 +357,15 @@ func goAndroidBuild(src, libPath string) error {
|
||||
}
|
||||
}
|
||||
if err != nil || gomobilepath == "" {
|
||||
return errors.New("android toolchain not installed, run:\n\tgomobile init")
|
||||
return errors.New("toolchain not installed, run:\n\tgomobile init")
|
||||
}
|
||||
verpath := filepath.Join(gomobilepath, "version")
|
||||
installedVersion, err := ioutil.ReadFile(verpath)
|
||||
if err != nil {
|
||||
return errors.New("android toolchain partially installed, run:\n\tgomobile init")
|
||||
return errors.New("toolchain partially installed, run:\n\tgomobile init")
|
||||
}
|
||||
if !bytes.Equal(installedVersion, version) {
|
||||
return errors.New("android toolchain out of date, run:\n\tgomobile init")
|
||||
return errors.New("toolchain out of date, run:\n\tgomobile init")
|
||||
}
|
||||
|
||||
ndkccpath = filepath.Join(gomobilepath, "android-"+ndkVersion)
|
||||
|
Loading…
x
Reference in New Issue
Block a user