Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: git_cache.py

Issue 232083002: Fix PATH searching for Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cache.py
diff --git a/git_cache.py b/git_cache.py
index b60073e972b1aa84e0eb091230df8e4a068ddf04..66f5f8660d2fcb1ab884b4d903f0c4919ad29317 100755
--- a/git_cache.py
+++ b/git_cache.py
@@ -155,6 +155,11 @@ class Mirror(object):
target = os.path.abspath(os.path.expanduser(target))
if os.path.isfile(target) and os.access(target, os.X_OK):
return target
+ if sys.platform.startswith('win'):
+ for suffix in ('.bat', '.cmd', '.exe'):
+ alt_target = target + suffix
+ if os.path.isfile(alt_target) and os.access(target, os.X_OK):
iannucci 2014/04/10 16:50:48 wouldn't os.access(... X_OK) always return True on
+ return alt_target
return None
@classmethod
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698