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...).
This commit is contained in:
parent
551c44f0fd
commit
b526eafa45
@ -819,13 +819,13 @@ def _main(argv=None):
|
|||||||
# scopes, then environment configuration here.
|
# 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
|
# make spack.config aware of any command line configuration scopes
|
||||||
if args.config_scopes:
|
if args.config_scopes:
|
||||||
spack.config.command_line_scopes = 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
|
# activate an environment if one was specified on the command line
|
||||||
env_format_error = None
|
env_format_error = None
|
||||||
if not args.no_env:
|
if not args.no_env:
|
||||||
|
Loading…
Reference in New Issue
Block a user