From 5127d95b2edab87805a206483db599aef61f0e0d Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Wed, 21 Aug 2019 15:46:12 -0700 Subject: properly format message with all paths that could not be used. also report canonicalized paths vs. Spack config variables like 'tempdir' (#12492) --- lib/spack/spack/stage.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib') 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. -- cgit v1.2.3-60-g2f50