summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2022-01-10 10:10:49 -0800
committerGitHub <noreply@github.com>2022-01-10 10:10:49 -0800
commit9f7fb6d01a9984b39116f447438d4d0f316f6f55 (patch)
treec09401e5f8fb73f1197f3c8a6595184ffca8348e
parentcc32b082052b4df5fec6b7ddf5d2361c820a0b0e (diff)
downloadspack-9f7fb6d01a9984b39116f447438d4d0f316f6f55.tar.gz
spack-9f7fb6d01a9984b39116f447438d4d0f316f6f55.tar.bz2
spack-9f7fb6d01a9984b39116f447438d4d0f316f6f55.tar.xz
spack-9f7fb6d01a9984b39116f447438d4d0f316f6f55.zip
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)
-rw-r--r--lib/spack/spack/stage.py2
1 files changed, 1 insertions, 1 deletions
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)