Keep output machine readable using spack find --format
in an env (#19698)
Currently, full JSON output is the only machine readable option for `spack find` in an environment. `spack find --format` is also designed to be machine readable, but we print extra headers in environments. -[x] don't print headers in `spack find` output when in an environment
This commit is contained in:
parent
b9f20c2351
commit
527a81b469
@ -235,6 +235,7 @@ def find(parser, args):
|
||||
if args.json:
|
||||
cmd.display_specs_as_json(results, deps=args.deps)
|
||||
else:
|
||||
if not args.format:
|
||||
if env:
|
||||
display_env(env, args, decorator)
|
||||
if sys.stdout.isatty() and args.groups:
|
||||
|
@ -209,6 +209,7 @@ def test_find_format(database, config):
|
||||
|
||||
output = find('--format', '{name}-{version}-{compiler.name}-{^mpi.name}',
|
||||
'mpileaks')
|
||||
assert "installed package" not in output
|
||||
assert set(output.strip().split('\n')) == set([
|
||||
"mpileaks-2.3-gcc-zmpi",
|
||||
"mpileaks-2.3-gcc-mpich",
|
||||
|
Loading…
Reference in New Issue
Block a user