Commit 6b5faf51 authored by szager@chromium.org's avatar szager@chromium.org

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
parent 333087e2
......@@ -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):
return alt_target
return None
@classmethod
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment