From d424d0e54e10bcd8602ebcd10fe6121eabd29b9a Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sat, 5 Mar 2022 21:41:18 -0800 Subject: find: deprecate `spack find -bootstrap` for `spack -bootstrap find` (#29152) Since adding the `spack --bootstrap` argument we don't need `spack find --bootstrap` anymore. Deprecate it. --- lib/spack/spack/cmd/find.py | 6 ++++++ lib/spack/spack/test/cmd/find.py | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/lib/spack/spack/cmd/find.py b/lib/spack/spack/cmd/find.py index cabdd33499..87bd164932 100644 --- a/lib/spack/spack/cmd/find.py +++ b/lib/spack/spack/cmd/find.py @@ -202,6 +202,12 @@ def display_env(env, args, decorator): def find(parser, args): + if args.bootstrap: + tty.warn( + "`spack find --bootstrap` is deprecated and will be removed in v0.19.", + "Use `spack --bootstrap find` instead." + ) + if args.bootstrap: bootstrap_store_path = spack.bootstrap.store_path() with spack.bootstrap.ensure_bootstrap_configuration(): diff --git a/lib/spack/spack/test/cmd/find.py b/lib/spack/spack/test/cmd/find.py index 8b8bf7a273..eb512a15cb 100644 --- a/lib/spack/spack/test/cmd/find.py +++ b/lib/spack/spack/test/cmd/find.py @@ -333,3 +333,8 @@ def test_find_loaded(database, working_env): output = find('--loaded') expected = find() assert output == expected + + +def test_bootstrap_deprecated(): + output = find('--bootstrap') + assert "`spack find --bootstrap` is deprecated" in output -- cgit v1.2.3-70-g09d2