summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py
index 5d78e354d1..9676d436dd 100644
--- a/lib/spack/spack/main.py
+++ b/lib/spack/spack/main.py
@@ -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())