Skip to content

Only last value is retained when same variant is specified multiple times during extra match search #499

Description

@xdelaruelle

When an extra specifier is specified several times it acts as an AND operation: envvar:BAR envvar:QUX means match modules that define both BAR and QUX environment variables.

However when it comes to variant value specification, only the last value specified is retained: foo=val1 foo=val2 is currently equivalent to foo=val2. During an extra match search, it would be expected that foo=val1 foo=val2 means foo=val1 AND foo=val2 to get same behavior than the one observed for extra specifier.

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

variant         foo val1 val2 val3
setenv          BAR value
setenv          QUX value
-------------------------------------------------------------------
$ module avail -t -o "" env:BAR env:QUX
foo/1.0
$ module avail -t -o "" env:FOO env:QUX
$ module avail -t -o "" foo=val1 foo=val2
foo/1.0
$ module avail -t -o "" foo=val4 foo=val1
foo/1.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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