diff options
author | Levi Baber <baberlevi@gmail.com> | 2018-03-09 14:40:57 -0600 |
---|---|---|
committer | scheibelp <scheibel1@llnl.gov> | 2018-03-09 12:40:57 -0800 |
commit | 38bb0e3e7d459fbb04d44368530eed1926c706b7 (patch) | |
tree | 172fe5d07c615ae43e82836e9996a8d79cd5058a /lib | |
parent | 9d3d7d321668e7cffc168f6410de9dbd6a8065b5 (diff) | |
download | spack-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.py | 2 |
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=[ |