From bb54ba9c70b89c8c1d235a4b2070520ddb7e2ae6 Mon Sep 17 00:00:00 2001 From: Diego Ciangottini Date: Fri, 19 Jul 2024 14:31:29 +0200 Subject: [PATCH] No CMD, suppose bin/sh --- pkg/slurm/aux.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/slurm/aux.go b/pkg/slurm/aux.go index dedafd2..99b5e52 100644 --- a/pkg/slurm/aux.go +++ b/pkg/slurm/aux.go @@ -432,7 +432,12 @@ func produceSLURMScript( defer f2.Close() if len(singularityCommand.containerArgs) != 0 { - cmdString = strings.Join(singularityCommand.containerCommand, " ") + " \"$(cat /tmp/args_" + singularityCommand.containerName + ".sh)\"" + if singularityCommand.containerCommand != nil { + cmdString = strings.Join(singularityCommand.containerCommand, " ") + " \"$(cat /tmp/args_" + singularityCommand.containerName + ".sh)\"" + } else { + cmdString = "/bin/sh -c \"$(cat /tmp/args_" + singularityCommand.containerName + ".sh)\"" + } + } else { cmdString = strings.Join(singularityCommand.containerCommand, " ") }