mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-03-01 08:41:14 +01:00
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:
parent
2b0d0065c7
commit
7875d1b97a
@ -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])
|
||||||
|
Loading…
Reference in New Issue
Block a user