diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-03-05 04:42:52 -0800 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-03-05 04:42:52 -0800 |
commit | bfce2c7508ada675ebe4398395b30ede82b67093 (patch) | |
tree | c5c847cf0559d50a34a8cd16471f8de81ade92bc | |
parent | fc6aa7374a243928af38fd1e583c6c67146951cd (diff) | |
download | spack-bfce2c7508ada675ebe4398395b30ede82b67093.tar.gz spack-bfce2c7508ada675ebe4398395b30ede82b67093.tar.bz2 spack-bfce2c7508ada675ebe4398395b30ede82b67093.tar.xz spack-bfce2c7508ada675ebe4398395b30ede82b67093.zip |
Fix bug in hook: ensure bin directory exists before listing.
-rw-r--r-- | lib/spack/spack/hooks/sbang.py | 3 |
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): |