diff options
-rw-r--r-- | lib/spack/spack/cmd/find.py | 5 | ||||
-rw-r--r-- | lib/spack/spack/test/cmd/find.py | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index db229aca7e..d9d51b853c 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -235,8 +235,9 @@ def find(parser, args): if args.json: cmd.display_specs_as_json(results, deps=args.deps) else: - if env: - display_env(env, args, decorator) + if not args.format: + if env: + display_env(env, args, decorator) if sys.stdout.isatty() and args.groups: tty.msg("%s" % plural(len(results), 'installed package')) cmd.display_specs( diff --git a/lib/spack/spack/test/cmd/find.py b/lib/spack/spack/test/cmd/find.py index 8d3c68d31a..9d2203aaaf 100644 --- a/lib/spack/spack/test/cmd/find.py +++ b/lib/spack/spack/test/cmd/find.py @@ -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", |