From 1179623002eb932776b69bfd6c50c5de600bb6d6 Mon Sep 17 00:00:00 2001 From: Jordan Galby <67924449+Jordan474@users.noreply.github.com> Date: Sun, 23 Jan 2022 11:02:13 +0100 Subject: Fix spack -C command_line_scope with other flags (#28418) The option `spack -C` was broken if another flag that touched config was also set (`spack -C ... -d`, `-c config:...` etc...). --- lib/spack/spack/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py index f41423fa1e..1932f2dab9 100644 --- a/lib/spack/spack/main.py +++ b/lib/spack/spack/main.py @@ -819,13 +819,13 @@ def _main(argv=None): # scopes, then environment configuration here. # ------------------------------------------------------------------------ - # ensure options on spack command come before everything - setup_main_options(args) - # make spack.config aware of any command line configuration scopes if args.config_scopes: spack.config.command_line_scopes = args.config_scopes + # ensure options on spack command come before everything + setup_main_options(args) + # activate an environment if one was specified on the command line env_format_error = None if not args.no_env: -- cgit v1.2.3-70-g09d2