summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/compiler.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/spack/spack/compiler.py b/lib/spack/spack/compiler.py
index 35e3b898ec..8debf518c7 100644
--- a/lib/spack/spack/compiler.py
+++ b/lib/spack/spack/compiler.py
@@ -169,6 +169,10 @@ class Compiler(object):
checks = []
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)
for exe in files:
full_path = join_path(directory, exe)