Skip to content

depends-on ignores module variant specification #626

@xdelaruelle

Description

@xdelaruelle

depends-on modulefile command ignores variants that are defined in the module specification.

Here is a simple example to reproduce this issue:

$ module show foo/1
-------------------------------------------------------------------
/path/to/modulefiles/foo/1:

variant         var val1 val2 val3
-------------------------------------------------------------------

$ module show bar/1
-------------------------------------------------------------------
/path/to/modulefiles/bar/1:

depends-on      foo var=val1
-------------------------------------------------------------------

$ module load bar/1
Loading foo/1
  ERROR: No value specified for variant 'var'
    Allowed values are: val1 val2 val3

Loading bar/1
  ERROR: Load of requirement foo failed

This issue also affects always-load and prereq-all modulefile commands.

The issue comes from the way arguments are parsed: the variant specification is wrongly considered as a separate module specification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions