Skip to content

Commit c481a7a

Browse files
committed
tcl: Fix SINGULARITY_*OPTS env vars setup
Use the `setenv` modulefile command to define the SINGULARITY_OPTS and SINGULARITY_COMMAND_OPTS environment variables in Tcl modulefiles. It is important to get both of these environment variables defined even if empty when the modulefile is loaded, as the various shell aliases rely on these variables. On Csh shells, an *Undefined variable* error is obtained if the environment variables are not defined.
1 parent aea975b commit c481a7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shpc/main/modules/templates/singularity.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ proc ModulesHelp { } {
4040
}
4141

4242
# Environment
43-
set ::env(SINGULARITY_OPTS) ""
44-
set ::env(SINGULARITY_COMMAND_OPTS) ""
43+
setenv SINGULARITY_OPTS ""
44+
setenv SINGULARITY_COMMAND_OPTS ""
4545

4646
# Variables
4747

0 commit comments

Comments
 (0)