environments: don't try to modify run-env if a spec is not installed (#13589)
Fixes #13529 Fixes #13509
This commit is contained in:
parent
fba963f1d1
commit
b44df29316
@ -1117,7 +1117,7 @@ def add_default_view_to_shell(self, shell):
|
||||
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 @@ def rm_default_view_from_shell(self, shell):
|
||||
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())
|
||||
|
Loading…
Reference in New Issue
Block a user