mirror of
ssh://git.janware.com/janware/proj/jw-pkg
synced 2026-04-25 17:45:55 +02:00
lib.util.run_cmd(): Remove parameter interactive
run_cmd() is a thin layer over the public ExecContext API, which
falls back to using a Local instance if not other ExecContext is
specified explicitly. Both the default Local context as the
subsequent call to run() should have the same idea about
interactivity, so allowing to specify it in two parameters
("interactive" and "cmd_input") is a bad idea. Remove "interactive".
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
fd336ecdcf
commit
910f10b194
2 changed files with 3 additions and 4 deletions
|
|
@ -41,6 +41,4 @@ class Exec(Base):
|
|||
|
||||
async def _run_ssh(self, cmd: list[str], cmd_input: bytes|None, *args, **kwargs) -> Result:
|
||||
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, interactive=self.interactive, 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