mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-24 17:23:36 +02:00
lib.ec.ssh.Exec._run_ssh(): Fix interactivity translation
cmd_input is passed as None to _run(), which is legal, but then used in a call to cmd_run(), which is a public API and, hence, illegal. InputMode.NonInteractive should be used instead, do that. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
910f10b194
commit
6cdcd23010
1 changed files with 2 additions and 0 deletions
|
|
@ -41,4 +41,6 @@ class Exec(Base):
|
||||||
|
|
||||||
async def _run_ssh(self, cmd: list[str], cmd_input: bytes|None, *args, **kwargs) -> Result:
|
async def _run_ssh(self, cmd: list[str], cmd_input: bytes|None, *args, **kwargs) -> Result:
|
||||||
self.__init_askpass()
|
self.__init_askpass()
|
||||||
|
if cmd_input is None:
|
||||||
|
cmd_input = InputMode.Interactive if self.interactive else InputMode.NonInteractive
|
||||||
return await run_cmd(['ssh', self.hostname, join_cmd(cmd)], cmd_input=cmd_input, throw=False)
|
return await run_cmd(['ssh', self.hostname, join_cmd(cmd)], cmd_input=cmd_input, throw=False)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue