From 9f7fb6d01a9984b39116f447438d4d0f316f6f55 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Mon, 10 Jan 2022 10:10:49 -0800 Subject: stage.steal_source: preserve symlinks This avoids dangling symlink errors. ignore_dangling_symlinks option would be more-targeted but is only available for Python >= 3.2 (#28318) --- lib/spack/spack/stage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index ceff320d6e..b447867727 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -543,7 +543,7 @@ class Stage(object): for entry in hidden_entries + entries: if os.path.isdir(entry): d = os.path.join(dest, os.path.basename(entry)) - shutil.copytree(entry, d) + shutil.copytree(entry, d, symlinks=True) else: shutil.copy2(entry, dest) -- cgit v1.2.3-70-g09d2