mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 13:25:37 +00:00
Bug 1476147 - Use path.isfile() instead of patch.exists() in which(). r=glandium
This excludes directories, and returns true only if it's an executable file. Differential Revision: https://phabricator.services.mozilla.com/D3366 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
78af5fd2ae
commit
1199851701
@ -305,7 +305,7 @@ class BaseBootstrapper(object):
|
||||
"""
|
||||
for path in os.environ['PATH'].split(os.pathsep):
|
||||
test = os.path.join(path, name)
|
||||
if os.path.exists(test) and os.access(test, os.X_OK):
|
||||
if os.path.isfile(test) and os.access(test, os.X_OK):
|
||||
return test
|
||||
|
||||
return None
|
||||
|
Loading…
Reference in New Issue
Block a user