2
0
mirror of synced 2025-02-22 14:28:14 +00:00

cmd/gomobile: Fix issue in init when downloading full NDK.

Fixes an issue where the full NDK could not be downloaded due to a missing execute permission.

Fixes golang/go#12208

Change-Id: I6f432b5021b082693a02a293f50caf6da4d4e379
Reviewed-on: https://go-review.googlesource.com/13669
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
Tim Cooijmans 2015-08-19 21:45:09 +02:00 committed by Hyang-Ah Hana Kim
parent 9308ad61ea
commit 78ac81ee2f

View File

@ -435,6 +435,10 @@ func fetchFullNDK() error {
// is not used, and 7z.exe is not a normal dependency.
var inflate *exec.Cmd
if goos != "windows" {
// The downloaded archive is executed on linux and os x to unarchive.
// To do this execute permissions are needed.
os.Chmod(archive, 0755)
inflate = exec.Command(archive)
} else {
inflate = exec.Command("7z.exe", "x", archive)