diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py index c2a61280ef8..f1a1ce3dc8a 100644 --- a/lib/spack/spack/build_environment.py +++ b/lib/spack/spack/build_environment.py @@ -1269,6 +1269,8 @@ def make_stack(tb, stack=None): obj = frame.f_locals["self"] if isinstance(obj, spack.package_base.PackageBase): break + else: + return None # We found obj, the Package implementation we care about. # Point out the location in the install method where we failed.