Skip to content
Snippets Groups Projects
Unverified Commit b44df293 authored by Adam J. Stewart's avatar Adam J. Stewart Committed by Todd Gamblin
Browse files

environments: don't try to modify run-env if a spec is not installed (#13589)

Fixes #13529
Fixes #13509
parent fba963f1
Branches
Tags
No related merge requests found
...@@ -1117,7 +1117,7 @@ def add_default_view_to_shell(self, shell): ...@@ -1117,7 +1117,7 @@ def add_default_view_to_shell(self, shell):
self.default_view)) self.default_view))
for _, spec in self.concretized_specs(): 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( env_mod.extend(self.environment_modifications_for_spec(
spec, self.default_view)) spec, self.default_view))
...@@ -1138,7 +1138,7 @@ def rm_default_view_from_shell(self, shell): ...@@ -1138,7 +1138,7 @@ def rm_default_view_from_shell(self, shell):
self.default_view).reversed()) self.default_view).reversed())
for _, spec in self.concretized_specs(): 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( env_mod.extend(
self.environment_modifications_for_spec( self.environment_modifications_for_spec(
spec, self.default_view).reversed()) spec, self.default_view).reversed())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment