mirror of
https://github.com/envmodules/modules.git
synced 2026-06-10 00:56:30 +08:00
Check if a passed modulefile correspond to an already loaded full path module (passed as full path name when it was loaded) thank to set modulepath. This is done to detect this modulefile is-loaded, should not be loaded a second time (with a different name) or should be unloaded. Add a 'findModuleNameFromModulefile' procedure to get corresponding modulefile name from a full path name based on currently enabled modulepaths. Adapt 'getLoadedWithClosestName' and 'getLoadedMatchingName' procedures to make use of 'findModuleNameFromModulefile' when a loaded module is detected to be full path. Make cmdModuleLoad use 'getLoadedMatchingName' after 'getPathToModule' to check whether returned module is already loaded or not (checking short or full path name combinations) Add tests on load, unload, swap and is-loaded actions.