Skip to content

Commit 5b76d39

Browse files
committed
tcl/lua: Add missing SINGULARITY_COMMAND_ARGS env. var
Add definition of the SINGULARITY_COMMAND_ARGS environment variable in both Tcl and Lua modulefile templates. Set this variable to an empty string like SINGULARITY_COMMAND_OPTS and SINGULARITY_OPTS. This is important to set this variable when module is loaded as the -run shell alias defined by this module relies on this variable. If not defined, an *Undefined variable* error is obtained on Csh shells.
1 parent 424de8f commit 5b76d39

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

shpc/main/modules/templates/singularity.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ local MODULEPATH="{{ module_dir }}"
4646
setenv("SINGULARITY_SHELL", "{{ singularity_shell }}")
4747
setenv ("SINGULARITY_OPTS", "")
4848
setenv ("SINGULARITY_COMMAND_OPTS", "")
49+
setenv ("SINGULARITY_COMMAND_ARGS", "")
4950

5051
-- interactive shell to any container, plus exec for aliases
5152
local containerPath = '{{ container_sif }}'

shpc/main/modules/templates/singularity.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ proc ModulesHelp { } {
4242
# Environment
4343
setenv SINGULARITY_OPTS ""
4444
setenv SINGULARITY_COMMAND_OPTS ""
45+
setenv SINGULARITY_COMMAND_ARGS ""
4546

4647
# Variables
4748

0 commit comments

Comments
 (0)