spack uninstall: improve error message for dependent environment (#44149)

This commit is contained in:
Greg Becker 2024-05-13 05:58:13 -07:00 committed by GitHub
parent fd3c18b6fd
commit d4fd6caae0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -239,6 +239,8 @@ def get_uninstall_list(args, specs: List[spack.spec.Spec], env: Optional[ev.Envi
print()
tty.info("The following environments still reference these specs:")
colify([e.name for e in other_dependent_envs.keys()], indent=4)
if env:
msgs.append("use `spack remove` to remove the spec from the current environment")
msgs.append("use `spack env remove` to remove environments")
msgs.append("use `spack uninstall --force` to override")
print()