summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Simon <dylan@dylex.net>2021-11-09 05:52:08 -0500
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2021-12-23 16:02:09 +0100
commit544826c8259edef6d9a3b67435e5a3b07f283ba7 (patch)
treee39e1560440adc208ce8e459cd54895e11cc7607
parentf92a2d688de53b5dd38891bb6546286bc7151236 (diff)
downloadspack-544826c8259edef6d9a3b67435e5a3b07f283ba7.tar.gz
spack-544826c8259edef6d9a3b67435e5a3b07f283ba7.tar.bz2
spack-544826c8259edef6d9a3b67435e5a3b07f283ba7.tar.xz
spack-544826c8259edef6d9a3b67435e5a3b07f283ba7.zip
make --enable-locks actually enable locks (#24675)
-rw-r--r--lib/spack/spack/main.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py
index 31a4bfe4ed..86f5c76002 100644
--- a/lib/spack/spack/main.py
+++ b/lib/spack/spack/main.py
@@ -491,8 +491,9 @@ def setup_main_options(args):
# override lock configuration if passed on command line
if args.locks is not None:
- spack.util.lock.check_lock_safety(spack.paths.prefix)
- spack.config.set('config:locks', False, scope='command_line')
+ if args.locks is False:
+ spack.util.lock.check_lock_safety(spack.paths.prefix)
+ spack.config.set('config:locks', args.locks, scope='command_line')
if args.mock:
rp = spack.repo.RepoPath(spack.paths.mock_packages_path)