Avoid an extra process hanging around when running the interpreter on the remote machine

This commit is contained in:
Kovid Goyal 2022-03-09 15:29:57 +05:30
parent 704717ff1d
commit 118306a9ff
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -412,7 +412,8 @@ def wrap_bootstrap_script(sh_script: str, interpreter: str) -> List[str]:
# finally surrounding with '
es = "'" + sh_script.replace("'", '\v').replace('\\', '\f').replace('\n', '\r').replace('!', '\b') + "'"
unwrap_script = r"""'eval "$(echo "$0" | tr \\\v\\\f\\\r\\\b \\\047\\\134\\\n\\\041)"' """
return [interpreter, '-c', unwrap_script, es]
# exec is supported by as sh like shells, and fish and csh
return ['exec', interpreter, '-c', unwrap_script, es]
def get_remote_command(