summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2019-08-21 15:46:12 -0700
committerTamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>2019-08-21 15:46:12 -0700
commit5127d95b2edab87805a206483db599aef61f0e0d (patch)
tree71ff8e4dadb88fa9a7587223a9aa9b75d36d5653 /lib
parent77e4e3d87e2c63ca65130bdfaefb811fb931a812 (diff)
downloadspack-5127d95b2edab87805a206483db599aef61f0e0d.tar.gz
spack-5127d95b2edab87805a206483db599aef61f0e0d.tar.bz2
spack-5127d95b2edab87805a206483db599aef61f0e0d.tar.xz
spack-5127d95b2edab87805a206483db599aef61f0e0d.zip
properly format message with all paths that could not be used. also report canonicalized paths vs. Spack config variables like 'tempdir' (#12492)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/stage.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py
index 3410e8b63e..56d48fa59d 100644
--- a/lib/spack/spack/stage.py
+++ b/lib/spack/spack/stage.py
@@ -41,7 +41,6 @@ def _first_accessible_path(paths):
for path in paths:
try:
# Ensure the user has access, creating the directory if necessary.
- path = sup.canonicalize_path(path)
if os.path.exists(path):
if can_access(path):
return path
@@ -80,9 +79,11 @@ def get_stage_root():
if isinstance(candidates, string_types):
candidates = [candidates]
- path = _first_accessible_path(candidates)
+ resolved_candidates = [sup.canonicalize_path(x) for x in candidates]
+ path = _first_accessible_path(resolved_candidates)
if not path:
- raise StageError("No accessible stage paths in:", candidates)
+ raise StageError("No accessible stage paths in:",
+ ' '.join(resolved_candidates))
# Ensure that any temp path is unique per user, so users don't
# fight over shared temporary space.