From 7ab6af8a3b6a419ae97ab7d110d0746b9b8e9602 Mon Sep 17 00:00:00 2001 From: Carson Woods Date: Wed, 17 Jul 2019 13:48:56 -0600 Subject: [PATCH] Add scope to setting active tree to ensure that it is set at user level --- lib/spack/spack/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 593a1f43bd9..b20a201f149 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -1499,12 +1499,14 @@ def do_install(self, **kwargs): global_root = spack.config.get('upstreams') global_root = global_root['global']['install_tree'] global_root = spack.util.path.canonicalize_path(global_root) - spack.config.set('config:active_tree', global_root) + spack.config.set('config:active_tree', global_root, + scope='user') elif upstream: raise NotImplementedError else: spack.config.set('config:active_tree', - spack.config.get('config:install_tree')) + spack.config.get('config:install_tree'), + scope='user') # For external packages the workflow is simplified, and basically # consists in module file generation and registration in the DB