Closed keithmaw closed 1 year ago
Hi @keithmaw what you showed is incorrect Tcl syntax, afaict this is not a problem with modules.
Trailing comments require a ;
to be placed before the comment character, because in Tcl the commenting is more like a command that doesnt get evaluated rather than a shell comment or comment-token in most programming languages.
instead of
setenv VAR value1 ## updated 10 May 2020
try:
setenv VAR value1 ;## updated 10 May 2020
When we use modules to source a standalone sourcefile, it fails if there are any trailing comments on a "setenv" line.
To Reproduce
Contents of a sourcefile:
setenv VAR value1 ## updated 10 May 2020
Contents of the module file
%Module1.0
source sourcefile
Result $ module load sourcer Loading sourcer Module ERROR: wrong # args: should be "setenv ?--set-if-undef? var val" while executing "setenv abcd efgh # test comment" (file "sourcefile" line 1) invoked from within "source sourcefile" (file "/users/kwilson/privatemodules/sourcer" line 13) Please contact root@localhost