diff options
author | iarspider <iarspider@gmail.com> | 2022-04-26 00:54:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-25 15:54:54 -0700 |
commit | 834f8e04ca362195f9a971d1f90b43ce52f78cc4 (patch) | |
tree | 12fc632c437a0bafabdb78ae4459b6843ed906cc | |
parent | 3ade5516a2f8b9ec998273c0f14884eb217415d0 (diff) | |
download | spack-834f8e04ca362195f9a971d1f90b43ce52f78cc4.tar.gz spack-834f8e04ca362195f9a971d1f90b43ce52f78cc4.tar.bz2 spack-834f8e04ca362195f9a971d1f90b43ce52f78cc4.tar.xz spack-834f8e04ca362195f9a971d1f90b43ce52f78cc4.zip |
Environments: add flag to skip printing concretized specs (#30272)
With an active environment, you can now run "spack concretize --quiet"
and it will suppress printing the concretized specs.
-rw-r--r-- | lib/spack/spack/cmd/concretize.py | 6 | ||||
-rwxr-xr-x | share/spack/spack-completion.bash | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/spack/spack/cmd/concretize.py b/lib/spack/spack/cmd/concretize.py index 09486a3db8..cbdc53907f 100644 --- a/lib/spack/spack/cmd/concretize.py +++ b/lib/spack/spack/cmd/concretize.py @@ -22,6 +22,9 @@ def setup_parser(subparser): help="""Concretize with test dependencies. When 'root' is chosen, test dependencies are only added for the environment's root specs. When 'all' is chosen, test dependencies are enabled for all packages in the environment.""") + subparser.add_argument( + '-q', '--quiet', action='store_true', + help="Don't print concretized specs") spack.cmd.common.arguments.add_concretizer_args(subparser) @@ -38,5 +41,6 @@ def concretize(parser, args): with env.write_transaction(): concretized_specs = env.concretize(force=args.force, tests=tests) - ev.display_specs(concretized_specs) + if not args.quiet: + ev.display_specs(concretized_specs) env.write() diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index b0870551f6..cc6ca6ab56 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -709,7 +709,7 @@ _spack_compilers() { } _spack_concretize() { - SPACK_COMPREPLY="-h --help -f --force --test -U --fresh --reuse" + SPACK_COMPREPLY="-h --help -f --force --test -q --quiet -U --fresh --reuse" } _spack_config() { |