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
experimental/szager/collated-output
szager@chromium.org 11 years ago
parent 333087e2c5
commit 6b5faf51dd

@ -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

Loading…
Cancel
Save