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

Adapt module show command run to cope with Environment Modules v5.5+ #4739

Open
wants to merge 2 commits into
base: 5.0.x
Choose a base branch
from

Conversation

xdelaruelle
Copy link
Contributor

The module show command is used by ModulesTool exist method to test the existence of a modulefile. Running module show against a non-existing modulefile will make modulecmd.tcl script to produce a non-zero exit code starting Modules v5.5.

With this change, the exit code check when running module show is disabled. It should not harm the module existence check as it relies on the analysis of the obtained stderr output.

Note that Lmod (as of version 8.7.55) does not set a non-zero exit code when running module show against a non-existing modulefile when LMOD_QUIET environment variable is set. If this behavior is changed in the future, this change will also benefit to Lmod.

The "module show" command is used by ModulesTool "exist" method to test
the existence of a modulefile. Running "module show" against a
non-existing modulefile will make modulecmd.tcl script to produce a
non-zero exit code starting Modules v5.5.

With this change, the exit code check when running "module show" is
disabled. It should not harm the module existence check as it relies
on the analysis of the obtained stderr output.

Note that Lmod (as of version 8.7.55) does not set a non-zero exit code
when running "module show" against a non-existing modulefile when
LMOD_QUIET environment variable is set. If this behavior is changed in
the future, this commit will also benefit to Lmod.
Starting Environment Modules v5.5, a non-zero exit code is set by
modulecmd.tcl when trying to load a non-existing module.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant