summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@googlemail.com>2017-10-21 05:41:25 +0200
committerTodd Gamblin <tgamblin@llnl.gov>2017-10-20 20:41:25 -0700
commit3afc6770f051415c26875df0ca521ab5c245fa99 (patch)
tree4698c94b4805f667d58f2f21dd1d5c7964803480 /lib
parenta8ee2a912bb7ae1900fba83dc64030717f261c2d (diff)
downloadspack-3afc6770f051415c26875df0ca521ab5c245fa99.tar.gz
spack-3afc6770f051415c26875df0ca521ab5c245fa99.tar.bz2
spack-3afc6770f051415c26875df0ca521ab5c245fa99.tar.xz
spack-3afc6770f051415c26875df0ca521ab5c245fa99.zip
module-type argument defaults to 'tcl' instead of every known type (#5751)
fixes #5721 This is to solve the fact that lmod needs to be configured by the user (to specify a core compiler).
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/cmd/common/arguments.py2
-rw-r--r--lib/spack/spack/cmd/module.py4
-rw-r--r--lib/spack/spack/test/cmd/module.py3
3 files changed, 6 insertions, 3 deletions
diff --git a/lib/spack/spack/cmd/common/arguments.py b/lib/spack/spack/cmd/common/arguments.py
index bb462580f1..9a185d2519 100644
--- a/lib/spack/spack/cmd/common/arguments.py
+++ b/lib/spack/spack/cmd/common/arguments.py
@@ -107,7 +107,7 @@ _arguments['module_type'] = Args(
'-m', '--module-type',
choices=spack.modules.module_types.keys(),
action='append',
- help='type of module file. More than one choice is allowed [default: all available module types]') # NOQA: ignore=E501
+ help='type of module file. More than one choice is allowed [default: tcl]') # NOQA: ignore=E501
_arguments['yes_to_all'] = Args(
'-y', '--yes-to-all', action='store_true', dest='yes_to_all',
diff --git a/lib/spack/spack/cmd/module.py b/lib/spack/spack/cmd/module.py
index 422ccdc196..8f18723633 100644
--- a/lib/spack/spack/cmd/module.py
+++ b/lib/spack/spack/cmd/module.py
@@ -332,7 +332,9 @@ def module(parser, args):
module_types = args.module_type
if module_types is None:
# If no selection has been made select all of them
- module_types = list(spack.modules.module_types.keys())
+ module_types = ['tcl']
+
+ module_types = list(set(module_types))
try:
diff --git a/lib/spack/spack/test/cmd/module.py b/lib/spack/spack/test/cmd/module.py
index 2025953059..a64746125e 100644
--- a/lib/spack/spack/test/cmd/module.py
+++ b/lib/spack/spack/test/cmd/module.py
@@ -54,7 +54,8 @@ def parser():
['rm', 'doesnotexist'], # Try to remove a non existing module
['find', 'mpileaks'], # Try to find a module with multiple matches
['find', 'doesnotexist'], # Try to find a module with no matches
- ['find', 'libelf'], # Try to find a module wo specifying the type
+ # Try to find a module specifying more than one type
+ ['find', '-m', 'tcl', '-m', 'lmod', 'libelf'],
]
)
def failure_args(request):