Add deprecation warnings for activate/deactivate/view (#29430)

This commit is contained in:
Harmen Stoppels
2022-03-17 22:52:56 +01:00
committed by GitHub
parent 282a366fc4
commit ea13122f3c
2 changed files with 8 additions and 0 deletions

View File

@@ -26,6 +26,10 @@ def setup_parser(subparser):
def activate(parser, args):
tty.warn("spack activate is deprecated in favor of "
"environments and will be removed in v0.19.0")
specs = spack.cmd.parse_specs(args.spec)
if len(specs) != 1:
tty.die("activate requires one spec. %d given." % len(specs))

View File

@@ -32,6 +32,10 @@ def setup_parser(subparser):
def deactivate(parser, args):
tty.warn("spack deactivate is deprecated in favor of "
"environments and will be removed in v0.19.0")
specs = spack.cmd.parse_specs(args.spec)
if len(specs) != 1:
tty.die("deactivate requires one spec. %d given." % len(specs))