quote output of modulecmd
The output of the modulecmd
should be quoted:
eval "$(modulecmd ....)"
Usually it doesn't matter, but in cases where we want to read and output a bash script inside a modulefile, the quotes are required. Without quotes the output of modulecmd
will be evaluated as one single line of code. If there are comments in the bash script, everything following the hash character will be interpreted as comment.