summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGreg Becker <becker33@llnl.gov>2021-05-27 09:20:57 -0700
committerGitHub <noreply@github.com>2021-05-27 09:20:57 -0700
commitb9a66966a806852697c299d0283270d97199b0b1 (patch)
treeb5b41172d2c085a4d04b8d8f10accfea86697c39 /lib
parent2b78b04dc5ef0d568a09f3ccda2fd7fa316fe656 (diff)
downloadspack-b9a66966a806852697c299d0283270d97199b0b1.tar.gz
spack-b9a66966a806852697c299d0283270d97199b0b1.tar.bz2
spack-b9a66966a806852697c299d0283270d97199b0b1.tar.xz
spack-b9a66966a806852697c299d0283270d97199b0b1.zip
only readlink on links (#23948)
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/environment.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py
index 647352a10e..b649d112dc 100644
--- a/lib/spack/spack/environment.py
+++ b/lib/spack/spack/environment.py
@@ -500,7 +500,7 @@ class ViewDescriptor(object):
@property
def _current_root(self):
- if not os.path.exists(self.root):
+ if not os.path.islink(self.root):
return None
root = os.readlink(self.root)