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.
This commit is contained in:
Todd Gamblin 2022-03-05 21:41:18 -08:00 committed by GitHub
parent 762893d4a6
commit d424d0e54e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -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():

View File

@ -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