summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-03-05 04:42:52 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2016-03-05 04:42:52 -0800
commitbfce2c7508ada675ebe4398395b30ede82b67093 (patch)
treec5c847cf0559d50a34a8cd16471f8de81ade92bc /lib
parentfc6aa7374a243928af38fd1e583c6c67146951cd (diff)
downloadspack-bfce2c7508ada675ebe4398395b30ede82b67093.tar.gz
spack-bfce2c7508ada675ebe4398395b30ede82b67093.tar.bz2
spack-bfce2c7508ada675ebe4398395b30ede82b67093.tar.xz
spack-bfce2c7508ada675ebe4398395b30ede82b67093.zip
Fix bug in hook: ensure bin directory exists before listing.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/hooks/sbang.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/spack/spack/hooks/sbang.py b/lib/spack/spack/hooks/sbang.py
index 6117c4809d..3390ecea29 100644
--- a/lib/spack/spack/hooks/sbang.py
+++ b/lib/spack/spack/hooks/sbang.py
@@ -67,6 +67,9 @@ def post_install(pkg):
"""This hook edits scripts so that they call /bin/bash
$spack_prefix/bin/sbang instead of something longer than the
shebang limit."""
+ if not os.path.isdir(pkg.prefix.bin):
+ return
+
for file in os.listdir(pkg.prefix.bin):
path = os.path.join(pkg.prefix.bin, file)
if shebang_too_long(path):