summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCarson Woods <carsonwoods@users.noreply.github.com>2019-07-12 17:06:26 -0600
committerPeter Scheibel <scheibel1@llnl.gov>2019-07-12 16:06:26 -0700
commit76f1ee5f32deec16d25561fdab3b242249e37145 (patch)
treeed884ac21bb9f9b79ec81c2612a710627671557c /lib
parentd01d79eb5d924d00bd59db2ef37870c4f816fdcc (diff)
downloadspack-76f1ee5f32deec16d25561fdab3b242249e37145.tar.gz
spack-76f1ee5f32deec16d25561fdab3b242249e37145.tar.bz2
spack-76f1ee5f32deec16d25561fdab3b242249e37145.tar.xz
spack-76f1ee5f32deec16d25561fdab3b242249e37145.zip
'spack compiler add' resolves relative path to absolute path (#11792)
Fixes #11782 Spack was not properly resolving relative paths to absolute paths when a relative path was passed to "spack compiler add [PATH]". Now, if provided a relative path, the absolute path is written to compilers.yaml rather than the relative path.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/llnl/util/filesystem.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/spack/llnl/util/filesystem.py b/lib/spack/llnl/util/filesystem.py
index 066eca5bd3..f4a1a9360c 100644
--- a/lib/spack/llnl/util/filesystem.py
+++ b/lib/spack/llnl/util/filesystem.py
@@ -1443,6 +1443,7 @@ def search_paths_for_executables(*path_hints):
if not os.path.isdir(path):
continue
+ path = os.path.abspath(path)
executable_paths.append(path)
bin_dir = os.path.join(path, 'bin')