Fix PATH searching for Windows.
I am TBR-ing everything today.
TBR=agable@chromium.org,hinoka@chromium.org
Review URL: https://codereview.chromium.org/232083002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@262831 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/git_cache.py b/git_cache.py
index b60073e..66f5f86 100755
--- a/git_cache.py
+++ b/git_cache.py
@@ -155,6 +155,11 @@
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):
+ return alt_target
return None
@classmethod