Skip to content

Commit

Permalink
No CMD, suppose bin/sh
Browse files Browse the repository at this point in the history
  • Loading branch information
dciangot authored Jul 19, 2024
1 parent 2928974 commit bb54ba9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/slurm/aux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, " ")
}
Expand Down

0 comments on commit bb54ba9

Please sign in to comment.