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

Unload module issue with --duplicates flag #421

Closed
mzborovsky opened this issue Oct 5, 2021 · 1 comment
Closed

Unload module issue with --duplicates flag #421

mzborovsky opened this issue Oct 5, 2021 · 1 comment
Labels
Milestone

Comments

@mzborovsky
Copy link

I'm using module version 4.7.0, in the module file, I have added --duplicates flag to solve an issue we had.
--duplicates flag works great but when unloading the module this output is printed on the screen:
Unloading tools/test
WARNING: --duplicates option has no effect on unload-path

I have managed to disable those messages with -silent flag when doing module unload / module switch, but I need it to be fixed inside the module file itself, so users won't need to add anything and this output won't be printed.
Is there any flag I could add to the prepend-path command or to the something in the module file ?

@xdelaruelle
Copy link
Member

Seems like a bug that also affects newer versions.

I will fix it on newer version but the following workaround could be used in existing modulefiles to avoid this warning message on older versions:

#%Module
if {[module-info mode unload]} {
    prepend-path FOO /path/to/dir
} else {
    prepend-path --duplicates FOO /path/to/dir
}

@xdelaruelle xdelaruelle added bug and removed question labels Oct 5, 2021
@xdelaruelle xdelaruelle added this to the 5.0.1 milestone Oct 6, 2021
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

2 participants