summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authoriarspider <iarspider@gmail.com>2022-05-16 22:34:57 +0200
committerGitHub <noreply@github.com>2022-05-16 13:34:57 -0700
commit63b6e484fca665a3e70e3b8d0d8586cb282a10bf (patch)
treed2b5e62eaa7b21660002470169cb5be8d22c0705 /var
parent2b12d19314c426c47fb7caf4b908fe88522260ed (diff)
downloadspack-63b6e484fca665a3e70e3b8d0d8586cb282a10bf.tar.gz
spack-63b6e484fca665a3e70e3b8d0d8586cb282a10bf.tar.bz2
spack-63b6e484fca665a3e70e3b8d0d8586cb282a10bf.tar.xz
spack-63b6e484fca665a3e70e3b8d0d8586cb282a10bf.zip
sigcpp: protect from missing prefix.share folder (#30686)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/sigcpp/package.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/sigcpp/package.py b/var/spack/repos/builtin/packages/sigcpp/package.py
index 2d2357d26b..e840d594c8 100644
--- a/var/spack/repos/builtin/packages/sigcpp/package.py
+++ b/var/spack/repos/builtin/packages/sigcpp/package.py
@@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import os
import shutil
from spack import *
@@ -21,7 +22,7 @@ class Sigcpp(CMakePackage):
@run_after('install')
def drop_doc(self):
- if self.spec.satisfies('~doc'):
+ if self.spec.satisfies('~doc') and os.path.isdir(prefix.share):
shutil.rmtree(prefix.share)
@run_after('install')