diff options
author | Jordan Galby <67924449+Jordan474@users.noreply.github.com> | 2022-01-23 11:02:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-23 11:02:13 +0100 |
commit | b526eafa45c95b76cc24cf803a68e98b78fb49b2 (patch) | |
tree | c602889358c9a44525c01b811fd410550734da35 | |
parent | 551c44f0fd8f52bd12eafe1f53210ce91cdd2647 (diff) | |
download | spack-b526eafa45c95b76cc24cf803a68e98b78fb49b2.tar.gz spack-b526eafa45c95b76cc24cf803a68e98b78fb49b2.tar.bz2 spack-b526eafa45c95b76cc24cf803a68e98b78fb49b2.tar.xz spack-b526eafa45c95b76cc24cf803a68e98b78fb49b2.zip |
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...).
-rw-r--r-- | lib/spack/spack/main.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py index e14cc4190b..34ba3c3349 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: |