info: properly report default when for overridden variants (#32040)

This commit is contained in:
Tamara Dahlgren 2022-08-11 05:09:53 -07:00 committed by GitHub
parent 5e57677140
commit f96b54b0a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,9 +145,7 @@ def lines(self):
name = textwrap.wrap(
"{0} [{1}]".format(k, self.default(v)), width=self.column_widths[0]
)
if len(w) == 1:
w = w[0]
if w == spack.spec.Spec():
if all(spec == spack.spec.Spec() for spec in w):
w = "--"
when = textwrap.wrap(str(w), width=self.column_widths[1])
allowed = v.allowed_values.replace("True, False", "on, off")