summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLevi Baber <baberlevi@gmail.com>2018-03-09 14:40:57 -0600
committerscheibelp <scheibel1@llnl.gov>2018-03-09 12:40:57 -0800
commit38bb0e3e7d459fbb04d44368530eed1926c706b7 (patch)
tree172fe5d07c615ae43e82836e9996a8d79cd5058a /lib
parent9d3d7d321668e7cffc168f6410de9dbd6a8065b5 (diff)
downloadspack-38bb0e3e7d459fbb04d44368530eed1926c706b7.tar.gz
spack-38bb0e3e7d459fbb04d44368530eed1926c706b7.tar.bz2
spack-38bb0e3e7d459fbb04d44368530eed1926c706b7.tar.xz
spack-38bb0e3e7d459fbb04d44368530eed1926c706b7.zip
resource: convert symlink to real path (#7417)
Fixes #7130 shutil.move expects a source path like "/x/y/" to be a directory and fails if "/x/y" is a symlink. This invokes realpath on the source path to avoid the issue.
Diffstat (limited to 'lib')
-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 19eca53d1d..e708662253 100644
--- a/lib/spack/spack/stage.py
+++ b/lib/spack/spack/stage.py
@@ -566,7 +566,7 @@ class ResourceStage(Stage):
'{stage}\n\tdestination : {destination}'.format(
stage=source_path, destination=destination_path
))
- shutil.move(source_path, destination_path)
+ shutil.move(os.path.realpath(source_path), destination_path)
@pattern.composite(method_list=[