import spack load error message (#9088)

It now additionally prints spec hash and options
This commit is contained in:
Andreas Baumbach 2018-08-28 03:26:24 +02:00 committed by scheibelp
parent 6f5a68a58d
commit 7d61ef5078

View File

@ -336,7 +336,7 @@ def modules_cmd(parser, args, module_type, callbacks=callbacks):
except MultipleSpecsMatch:
msg = "the constraint '{query}' matches multiple packages:\n"
for s in specs:
msg += '\t' + s.cformat() + '\n'
msg += '\t' + s.cformat(format_string='$/ $_$@$+$%@+$+$=') + '\n'
tty.error(msg.format(query=args.constraint))
tty.die('In this context exactly **one** match is needed: please specify your constraints better.') # NOQA: ignore=E501