Skip to content

Commit 2a20a2d

Browse files
committed
testing fix for tcl modules that do not accept command line args
Signed-off-by: vsoch <[email protected]>
1 parent f24060a commit 2a20a2d

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ The versions coincide with releases on pip. Only major versions will be released
1515

1616
## [0.0.x](https://github.scom/singularityhub/singularity-hpc/tree/master) (0.0.x)
1717
- `.version` file should be written in top level of module folders [#450](https://github.com/singularityhub/singularity-hpc/issues/450) (0.0.35)
18+
- tcl module functions need `$@` to handle additional arguments
1819
- Tcl modules use shell functions for bash, to export to child shells (0.0.34)
1920
- fixed missing singularity -B flag for custom home feature
2021
- fixed singularity.tcl to always replace $ with \$ for custom home feature

shpc/main/modules/templates/docker.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ set-alias {|module_name|}-shell "${shellCmd}"
7070
{% if aliases %}
7171
if { [ module-info shell bash ] } {
7272
if { [ module-info mode load ] } {
73-
{% for alias in aliases %} puts stdout "function {{ alias.name }}() { ${execCmd} {% if alias.docker_options %} {{ alias.docker_options | replace("$", "\$") }} {% endif %} --entrypoint {{ alias.entrypoint | replace("$", "\$") }} ${containerPath} {{ alias.args | replace("$", "\$") }}; }; export -f {{ alias.name }};"
73+
{% for alias in aliases %} puts stdout "function {{ alias.name }}() { ${execCmd} {% if alias.docker_options %} {{ alias.docker_options | replace("$", "\$") }} {% endif %} --entrypoint {{ alias.entrypoint | replace("$", "\$") }} ${containerPath} {{ alias.args | replace("$", "\$") }} \$@; }; export -f {{ alias.name }};"
7474
{% endfor %}
7575
}
7676
if { [ module-info mode remove ] } {

shpc/main/modules/templates/singularity.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ set-alias {|module_name|}-shell "${shellCmd}"
7878
{% if aliases %}
7979
if { [ module-info shell bash ] } {
8080
if { [ module-info mode load ] } {
81-
{% for alias in aliases %} puts stdout "function {{ alias.name }}() { ${execCmd} {% if alias.singularity_options %} {{ alias.singularity_options | replace("$", "\$") }} {% endif %} ${containerPath} {{ alias.command | replace("$", "\$") }}; }; export -f {{ alias.name }};"
81+
{% for alias in aliases %} puts stdout "function {{ alias.name }}() { ${execCmd} {% if alias.singularity_options %} {{ alias.singularity_options | replace("$", "\$") }} {% endif %} ${containerPath} {{ alias.command | replace("$", "\$") }} \$@; }; export -f {{ alias.name }};"
8282
{% endfor %}
8383
}
8484
if { [ module-info mode remove ] } {

0 commit comments

Comments
 (0)