diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2019-11-11 06:02:36 -0600 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2019-12-01 20:22:31 -0800 |
commit | b44df29316c52150702d35026e8da7b84fd8632b (patch) | |
tree | c46cb5dffe9beabfd11c7ce091fc00c47ced38ab | |
parent | fba963f1d10a7d725af3db4d449451003371fd23 (diff) | |
download | spack-b44df29316c52150702d35026e8da7b84fd8632b.tar.gz spack-b44df29316c52150702d35026e8da7b84fd8632b.tar.bz2 spack-b44df29316c52150702d35026e8da7b84fd8632b.tar.xz spack-b44df29316c52150702d35026e8da7b84fd8632b.zip |
environments: don't try to modify run-env if a spec is not installed (#13589)
Fixes #13529
Fixes #13509
-rw-r--r-- | lib/spack/spack/environment.py | 4 |
1 files 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()) |