core: add a helpful long message for UnknownPackageError (#31996)
``` Error: Package 'armpl' not found. ``` is pretty useless after an upgrade unless you're a spack pro. I've recently hit this on multiple machines. See https://github.com/spack/spack/issues/31453 , https://github.com/spack/spack/issues/31489 .
This commit is contained in:
parent
13bcf82851
commit
5d6ab9a76c
1 changed files with 2 additions and 0 deletions
|
@ -1478,6 +1478,8 @@ def __init__(self, name, repo=None):
|
|||
if name.endswith(".yaml"):
|
||||
long_msg = "Did you mean to specify a filename with './{0}'?"
|
||||
long_msg = long_msg.format(name)
|
||||
else:
|
||||
long_msg = "You may need to run 'spack clean -m'."
|
||||
else:
|
||||
msg = "Attempting to retrieve anonymous package."
|
||||
|
||||
|
|
Loading…
Reference in a new issue