equal
deleted
inserted
replaced
21 import unicodedata |
21 import unicodedata |
22 |
22 |
23 from .i18n import _ |
23 from .i18n import _ |
24 from . import ( |
24 from . import ( |
25 encoding, |
25 encoding, |
|
26 pycompat, |
26 ) |
27 ) |
27 |
28 |
28 posixfile = open |
29 posixfile = open |
29 normpath = os.path.normpath |
30 normpath = os.path.normpath |
30 samestat = os.path.samestat |
31 samestat = os.path.samestat |
459 return findexisting(command) |
460 return findexisting(command) |
460 |
461 |
461 if sys.platform == 'plan9': |
462 if sys.platform == 'plan9': |
462 return findexisting(os.path.join('/bin', command)) |
463 return findexisting(os.path.join('/bin', command)) |
463 |
464 |
464 for path in os.environ.get('PATH', '').split(os.pathsep): |
465 for path in os.environ.get('PATH', '').split(pycompat.ospathsep): |
465 executable = findexisting(os.path.join(path, command)) |
466 executable = findexisting(os.path.join(path, command)) |
466 if executable is not None: |
467 if executable is not None: |
467 return executable |
468 return executable |
468 return None |
469 return None |
469 |
470 |