From 544826c8259edef6d9a3b67435e5a3b07f283ba7 Mon Sep 17 00:00:00 2001 From: Dylan Simon Date: Tue, 9 Nov 2021 05:52:08 -0500 Subject: make --enable-locks actually enable locks (#24675) --- lib/spack/spack/main.py | 5 +++-- 1 file 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) -- cgit v1.2.3-70-g09d2