Closed dougnd closed 1 year ago
Thanks for the bug report! I found three different issues related to this bug. One issue was the somehow the luaposix package on Rocky has a broken posix.readlink funciton which I now work around.
I was able to reproduce the issue and fix it for me. This fix will be part of 8.7.20 which will be released soon. I have updaed the main branch if you wish to test this fix.
Awesome, thank you for digging in! It didn't occur to me that the luaposix package was a culprit. Thank you for the very quick fix.
Notes Please note that we do not provide patches to older versions of Lmod, To speed up fixing your issue please test your bug against the latest version of Lmod. See: https://lmod.readthedocs.io/en/latest/045_transition.html if you want to install the latest version in your own account.
Describe the bug Shell detection seems to always return "bash" when module is called in tcsh shell script (using shebang). Note, this detection seemed to work as expected in earlier versions (in particular, it worked in Lmod 8.7.7 ).
To Reproduce Steps to reproduce the behavior:
If you run directly through tcsh, it seems to work:
If you run using shebang, it doesn't detect as tcsh properly:
Expected behavior
I'd expect that running
./test.csh
results in the shell being detected as tcsh.Desktop (please complete the following information):
Modules based on Lua: Version 8.7.19 2023-01-17 10:45 -06:00 by Robert McLay mclay@tacc.utexas.edu
Changes from Default Configuration
Name Where Set Default Value
LMOD_HAVE_LUA_TERM C no yes LMOD_PACKAGE_PATH D nil
LMOD_PAGER C less /usr/bin/more
LMOD_SYSTEM_DEFAULT_MODULES D unknown
LMOD_TCLSH C tclsh /usr/bin/tclsh
MODULEPATH_ROOT E /usr/share/modulefiles
PATH_TO_LUA C lua /usr/bin/lua
Where Set -> D: default, E: environment, C: configuration lmod_cfg: lmod_config.lua SitePkg: SitePackage StdPkg: StandardPackage Other: Set somewhere outside of normal locations