summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGreg Becker <becker33@llnl.gov>2024-05-13 05:58:13 -0700
committerGitHub <noreply@github.com>2024-05-13 14:58:13 +0200
commitd4fd6caae0b50d0d0c0823168d64234a780b1a0e (patch)
treee25bede66bcfb072e30c52f61e6bd8fe57c00b27 /lib
parentfd3c18b6fd7eda8abbb72ee81b39aa81b053d9bd (diff)
downloadspack-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.py2
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()