-
Notifications
You must be signed in to change notification settings - Fork 109
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
protect environment variables from being modified by modulefiles #429
Comments
@adrien-cotte I have started above the design for the feature you wished (to protect some env var from being changed by modulefiles). These guidelines may help you if you want to provide a PR for this. |
Thank you Xavier, could you give me hints about files to edit in order to implement this feature, please? |
@adrien-cotte I have just written a document to guide developers willing to add new configuration option to Modules: https://modules.readthedocs.io/en/latest/design/add-new-config-option.html Let me know if this doc is not clear enough (I have created a chatroom for Modules on matrix.org for questions and feedback like this: #modules:matrix.org) |
@adrien-cotte In addition to the guidelines for introducing new configuration option. All environment variable changes go through the
So I suggest to update both |
Hi @xdelaruelle This is my first try.
What do you think? I still have to write configure, documentation, completion and testsuite for this new feature. |
Good start! Some suggestions:
|
@adrien-cotte Any news from your side on this pull request ? |
This is on my vacation to-do list 😊 |
As discussed on the mailing-list, it appears interesting to be able to protect some environment variables from being changed when loading or unloading modulefiles.
This could be implemented by adding a
protected_envvars
, a colon-separated list holding the environment variables that cannot be modified by modulefiles. This configuration is linked to theMODULES_PROTECTED_ENVVARS
environment variable.A warning message should be emitted when a modulefile attempts to modify a protected environment variable. This warning does not end the ongoing modulefile evaluation.
Modulefile commands affected by this warning message are:
The text was updated successfully, but these errors were encountered: