Improve wording of audit message (#36180)

This commit is contained in:
Massimiliano Culpo 2023-03-17 22:43:35 +01:00 committed by GitHub
parent 4f7c147d50
commit 0478e5f684
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -695,8 +695,11 @@ def _ensure_variant_defaults_are_parsable(pkgs, error_cls):
try:
variant.validate_or_raise(vspec, pkg_cls=pkg_cls)
except spack.variant.InvalidVariantValueError:
error_msg = "The variant '{}' default value in package '{}' cannot be validated"
errors.append(error_cls(error_msg.format(variant_name, pkg_name), []))
error_msg = (
"The default value of the variant '{}' in package '{}' failed validation"
)
question = "Is it among the allowed values?"
errors.append(error_cls(error_msg.format(variant_name, pkg_name), [question]))
return errors