Explicitly call /bin/sh for compatibility with non POSIX shells.

The fish shell doesn’t support ‘||’ and requires a ‘—python python’
workaround.  This change explicitly calls /bin/sh for the remote shell
commands.
This commit is contained in:
Andrew Gillham 2016-03-08 15:30:59 -08:00
parent 2b0d0065c7
commit 7875d1b97a

View File

@ -108,8 +108,8 @@ def connect(ssh_cmd, rhostport, python, stderr, options):
if python: if python:
pycmd = "'%s' -c '%s'" % (python, pyscript) pycmd = "'%s' -c '%s'" % (python, pyscript)
else: else:
pycmd = ("P=python3.5; $P -V 2>/dev/null || P=python; " pycmd = ("exec /bin/sh -c \'P=python3.5; $P -V 2>/dev/null || P=python; "
"exec \"$P\" -c '%s'") % pyscript "exec \"$P\" -c \\'%s\\'\'") % pyscript
argv = (sshl + argv = (sshl +
portl + portl +
[rhost, '--', pycmd]) [rhost, '--', pycmd])