Index: native_client_sdk/src/tools/getos.py |
diff --git a/native_client_sdk/src/tools/getos.py b/native_client_sdk/src/tools/getos.py |
index 89b6c5790054999739fdaa77a94110376d49ae0e..c4e31c3188834a40b95db0cff49a0f19af9d7f1d 100755 |
--- a/native_client_sdk/src/tools/getos.py |
+++ b/native_client_sdk/src/tools/getos.py |
@@ -144,9 +144,17 @@ def GetNaClArch(platform): |
# If CHROME_PATH is set to point to google-chrome or google-chrome |
# was found in the PATH and we are running on UNIX then google-chrome |
# is a bash script that points to 'chrome' in the same folder. |
- if os.path.basename(chrome_path) == 'google-chrome': |
+ # |
+ # When running beta or dev branch, the name is google-chrome-{beta,dev}. |
+ if os.path.basename(chrome_path).startswith('google-chrome'): |
chrome_path = os.path.join(os.path.dirname(chrome_path), 'chrome') |
+ if not os.path.exists(chrome_path): |
+ raise Error("File %s does not exist." % chrome_path) |
+ |
+ if not os.access(chrome_path, os.X_OK): |
+ raise Error("File %s is not executable" % chrome_path) |
+ |
Sam Clegg
2014/07/23 21:11:49
I was thinking we of doing this before we replace
|
try: |
pobj = subprocess.Popen(['objdump', '-f', chrome_path], |
stdout=subprocess.PIPE, |