You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--mpi-command is passed through strconv.Quote, so any command with arguments becomes one argv word (and $ still expands) #660
Effect: --mpi-command "./gchp --flag x" becomes mpirun ... "./gchp --flag x", a single argument, so mpirun looks for an executable literally named ./gchp --flag x. Only argument-free commands work.
Also, strconv.Quote produces Go/C escaping inside double quotes, which is not shell escaping: $VAR, $(...) and backticks still expand on the instance. So it neither preserves argv nor neutralizes shell metacharacters.
Suggested: treat --mpi-command as a shell command line (it is user-authored, same trust as --command) and emit it unquoted into a generated script, e.g. write it to /etc/spawn/mpi-command and run mpirun ... bash /etc/spawn/mpi-command, or accept repeatable --mpi-arg. If injection safety is the goal, single-quote with '\'' escaping.
Related: the same template prepends /usr/lib64/openmpi/bin to PATH even with --skip-mpi-install; harmless, but documenting that a custom MPI must be set up by the user's command would help.
Workaround: put the launch in a script and pass its path.
Activity