checkin-test-sems.sh cannot find module command from non-bash shells
Created by: kddevin
In #895 (closed), it was discovered that checkin-test-sems.sh could not find the "module" command from shells that were not bash shells. The problem is not specific to Mac OS X; I can reproduce it on a RHEL system. Thus, I am starting a new issue (but leaving much of the background in #895 (closed)).
I think the issue with bash vs other shells is that /usr/local/opt/modules/Modules/init/bash defines the "module" command as a function for bash, while for other shells, "module" is defined as an alias (e.g., /usr/local/opt/modules/Modules/init/tcsh).
Aliases don't get transferred to the bash script checkin-test-sems.sh in the same way that the module function is.
Thus, checkin-test-sems.sh fails to find the module command, and eventually fails.
A workaround is to run checkin-test-sems.sh from a bash script that first sources /usr/local/opt/modules/Modules/init/bash. Doing so is only a little hassle, but it allows checkin-test-sems.sh to at least launch correctly. If this workaround is the final solution, it needs to be documented somewhere (besides here). But perhaps there is a better solution that can be implemented within checkin-test-sems.sh.