diff options
author | Greg Becker <becker33@llnl.gov> | 2024-05-13 05:58:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-13 14:58:13 +0200 |
commit | d4fd6caae0b50d0d0c0823168d64234a780b1a0e (patch) | |
tree | e25bede66bcfb072e30c52f61e6bd8fe57c00b27 /lib | |
parent | fd3c18b6fd7eda8abbb72ee81b39aa81b053d9bd (diff) | |
download | spack-d4fd6caae0b50d0d0c0823168d64234a780b1a0e.tar.gz spack-d4fd6caae0b50d0d0c0823168d64234a780b1a0e.tar.bz2 spack-d4fd6caae0b50d0d0c0823168d64234a780b1a0e.tar.xz spack-d4fd6caae0b50d0d0c0823168d64234a780b1a0e.zip |
spack uninstall: improve error message for dependent environment (#44149)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/uninstall.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/spack/spack/cmd/uninstall.py b/lib/spack/spack/cmd/uninstall.py index 62a7ac1f32..2022290057 100644 --- a/lib/spack/spack/cmd/uninstall.py +++ b/lib/spack/spack/cmd/uninstall.py @@ -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() |