properly format message with all paths that could not be used. also report canonicalized paths vs. Spack config variables like 'tempdir' (#12492)
This commit is contained in:
parent
77e4e3d87e
commit
5127d95b2e
@ -41,7 +41,6 @@ def _first_accessible_path(paths):
|
|||||||
for path in paths:
|
for path in paths:
|
||||||
try:
|
try:
|
||||||
# Ensure the user has access, creating the directory if necessary.
|
# Ensure the user has access, creating the directory if necessary.
|
||||||
path = sup.canonicalize_path(path)
|
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
if can_access(path):
|
if can_access(path):
|
||||||
return path
|
return path
|
||||||
@ -80,9 +79,11 @@ def get_stage_root():
|
|||||||
if isinstance(candidates, string_types):
|
if isinstance(candidates, string_types):
|
||||||
candidates = [candidates]
|
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:
|
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
|
# Ensure that any temp path is unique per user, so users don't
|
||||||
# fight over shared temporary space.
|
# fight over shared temporary space.
|
||||||
|
Loading…
Reference in New Issue
Block a user