-
Notifications
You must be signed in to change notification settings - Fork 119
Closed
Labels
Milestone
Description
When a module defines variants, they should be specified for any module evaluation.
$ ml show foo
-------------------------------------------------------------------
/path/to/modulefiles/foo/1.0:
variant --boolean bar
ERROR: No value specified for variant 'bar'
Allowed values are: 1 0 yes no true false on off
-------------------------------------------------------------------In case of a display evaluation it is a bit harsh to ask for all variant without a default value defined to be specified. As module display may be invoked to understand what are the variants defined by the module.
It seems better to help users understand modulefile content to report variants without an error is no value is provided, then maybe end in error if the modulefile make use of the variant value later in the code, but at least user will obtain all the information on variants if they have been correctly defined at the start of the modulefile.