From 1fd6fedba5e8193a040c3214c00c04792e15d9ed 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(-) (limited to 'lib') diff --git a/lib/spack/spack/stage.py b/lib/spack/spack/stage.py index bffd06ab73..df1f6761ac 100644 --- a/lib/spack/spack/stage.py +++ b/lib/spack/spack/stage.py @@ -533,7 +533,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-60-g2f50