From b44df29316c52150702d35026e8da7b84fd8632b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 11 Nov 2019 06:02:36 -0600 Subject: environments: don't try to modify run-env if a spec is not installed (#13589) Fixes #13529 Fixes #13509 --- lib/spack/spack/environment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/environment.py b/lib/spack/spack/environment.py index f16599c215..55d513ee27 100644 --- a/lib/spack/spack/environment.py +++ b/lib/spack/spack/environment.py @@ -1117,7 +1117,7 @@ class Environment(object): self.default_view)) for _, spec in self.concretized_specs(): - if spec in self.default_view: + if spec in self.default_view and spec.package.installed: env_mod.extend(self.environment_modifications_for_spec( spec, self.default_view)) @@ -1138,7 +1138,7 @@ class Environment(object): self.default_view).reversed()) for _, spec in self.concretized_specs(): - if spec in self.default_view: + if spec in self.default_view and spec.package.installed: env_mod.extend( self.environment_modifications_for_spec( spec, self.default_view).reversed()) -- cgit v1.2.3-70-g09d2