sigcpp: protect from missing prefix.share folder (#30686)
This commit is contained in:
parent
2b12d19314
commit
63b6e484fc
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user