Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
xdelaruelle opened this issue Jun 20, 2023 · 0 comments
Labels
Milestone

Comments

@xdelaruelle
Copy link
Member

xdelaruelle commented Jun 20, 2023

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
@xdelaruelle xdelaruelle added this to the 5.3.1 milestone Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant