env: fix display of concretized specs in spack find
- fix highlighting of roots in concretized specs in `spack find` - tighten up the `spack find` output in environments
This commit is contained in:
parent
8d92fd6640
commit
0f2bfd7492
@ -133,7 +133,7 @@ def strip_build(seq):
|
|||||||
|
|
||||||
def decorator(spec, fmt):
|
def decorator(spec, fmt):
|
||||||
# add +/-/* to show added/removed/root specs
|
# add +/-/* to show added/removed/root specs
|
||||||
if spec in roots:
|
if any(spec.dag_hash() == r.dag_hash() for r in roots):
|
||||||
return color.colorize('@*{%s}' % fmt)
|
return color.colorize('@*{%s}' % fmt)
|
||||||
elif spec in removed:
|
elif spec in removed:
|
||||||
return color.colorize('@K{%s}' % fmt)
|
return color.colorize('@K{%s}' % fmt)
|
||||||
@ -171,12 +171,10 @@ def find(parser, args):
|
|||||||
if env:
|
if env:
|
||||||
tty.msg('In environment %s' % env.name)
|
tty.msg('In environment %s' % env.name)
|
||||||
|
|
||||||
print()
|
|
||||||
tty.msg('Root specs')
|
|
||||||
|
|
||||||
if not env.user_specs:
|
if not env.user_specs:
|
||||||
print('none')
|
tty.msg('No root specs')
|
||||||
else:
|
else:
|
||||||
|
tty.msg('Root specs')
|
||||||
display_specs(
|
display_specs(
|
||||||
env.user_specs, args,
|
env.user_specs, args,
|
||||||
decorator=lambda s, f: color.colorize('@*{%s}' % f))
|
decorator=lambda s, f: color.colorize('@*{%s}' % f))
|
||||||
|
Loading…
Reference in New Issue
Block a user