From 78ac81ee2ff8a449961ac74c25353cda06b75c23 Mon Sep 17 00:00:00 2001 From: Tim Cooijmans Date: Wed, 19 Aug 2015 21:45:09 +0200 Subject: [PATCH] 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 --- cmd/gomobile/init.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/gomobile/init.go b/cmd/gomobile/init.go index b03732f..137ee36 100644 --- a/cmd/gomobile/init.go +++ b/cmd/gomobile/init.go @@ -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)