Fix spack --profile|--pdb <cmd> (#42662)

This commit is contained in:
Scott Wittenburg 2024-02-15 15:15:40 -07:00 committed by GitHub
parent d19fa74909
commit 6c3511ee1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1038,9 +1038,9 @@ def finish_parse_and_run(parser, cmd_name, main_args, env_format_error):
set_working_dir()
# now we can actually execute the command.
if args.spack_profile or args.sorted_profile:
if main_args.spack_profile or main_args.sorted_profile:
_profile_wrapper(command, parser, args, unknown)
elif args.pdb:
elif main_args.pdb:
import pdb
pdb.runctx("_invoke_command(command, parser, args, unknown)", globals(), locals())