Skip to content

Commit

Permalink
Avoid blind chmod on android_cmd
Browse files Browse the repository at this point in the history
Check for the missing exec bit before attempting to change it instead.
  • Loading branch information
manuelbua committed May 12, 2014
1 parent aba13fd commit f857366
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion buildozer/targets/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ def _install_android_packages(self):
# 3 pass installation.
need_refresh = False

self.buildozer.cmd('chmod ug+x {}'.format(self.android_cmd))
if not os.access(self.android_cmd, os.X_OK):
self.buildozer.cmd('chmod ug+x {}'.format(self.android_cmd))

# 1. update the tool and platform-tools if needed
packages = self._android_list_sdk()
Expand Down

0 comments on commit f857366

Please sign in to comment.