spack compiler add checks for access before listing directories.
This commit is contained in:
parent
f60fd330cb
commit
85a14b68b7
1 changed files with 4 additions and 0 deletions
|
@ -169,6 +169,10 @@ def _find_matches_in_path(cls, compiler_names, detect_version, *path):
|
||||||
|
|
||||||
checks = []
|
checks = []
|
||||||
for directory in path:
|
for directory in path:
|
||||||
|
if not (os.path.isdir(directory) and
|
||||||
|
os.access(directory, os.R_OK | os.X_OK)):
|
||||||
|
continue
|
||||||
|
|
||||||
files = os.listdir(directory)
|
files = os.listdir(directory)
|
||||||
for exe in files:
|
for exe in files:
|
||||||
full_path = join_path(directory, exe)
|
full_path = join_path(directory, exe)
|
||||||
|
|
Loading…
Reference in a new issue