diff --git a/lib/spack/spack/main.py b/lib/spack/spack/main.py index a5b0358c56..47d0e65283 100644 --- a/lib/spack/spack/main.py +++ b/lib/spack/spack/main.py @@ -584,7 +584,8 @@ def shell_set(var, value): # print environment module system if available. This can be expensive # on clusters, so skip it if not needed. if 'modules' in info: - specs = spack.store.db.query('environment-modules') + specs = spack.store.db.query( + 'environment-modules arch=%s' % spack.architecture.sys_type()) if specs: shell_set('_sp_module_prefix', specs[-1].prefix) else: