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).
This commit is contained in:
parent
a8ee2a912b
commit
3afc6770f0
3 changed files with 6 additions and 3 deletions
|
@ -107,7 +107,7 @@ def __call__(self, parser, namespace, values, option_string=None):
|
||||||
'-m', '--module-type',
|
'-m', '--module-type',
|
||||||
choices=spack.modules.module_types.keys(),
|
choices=spack.modules.module_types.keys(),
|
||||||
action='append',
|
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(
|
_arguments['yes_to_all'] = Args(
|
||||||
'-y', '--yes-to-all', action='store_true', dest='yes_to_all',
|
'-y', '--yes-to-all', action='store_true', dest='yes_to_all',
|
||||||
|
|
|
@ -332,7 +332,9 @@ def module(parser, args):
|
||||||
module_types = args.module_type
|
module_types = args.module_type
|
||||||
if module_types is None:
|
if module_types is None:
|
||||||
# If no selection has been made select all of them
|
# 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:
|
try:
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,8 @@ def parser():
|
||||||
['rm', 'doesnotexist'], # Try to remove a non existing module
|
['rm', 'doesnotexist'], # Try to remove a non existing module
|
||||||
['find', 'mpileaks'], # Try to find a module with multiple matches
|
['find', 'mpileaks'], # Try to find a module with multiple matches
|
||||||
['find', 'doesnotexist'], # Try to find a module with no 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):
|
def failure_args(request):
|
||||||
|
|
Loading…
Reference in a new issue