ssh: default tty to False
nix behaves weird when the terminal is interactive because we are also do line buffering.
This commit is contained in:
parent
54f0526c5b
commit
7b8a49bf6c
@ -413,7 +413,7 @@ class Host:
|
|||||||
timeout: float = math.inf,
|
timeout: float = math.inf,
|
||||||
interactive: bool = False,
|
interactive: bool = False,
|
||||||
verbose_ssh: bool = False,
|
verbose_ssh: bool = False,
|
||||||
tty: bool = True,
|
tty: bool = False,
|
||||||
) -> subprocess.CompletedProcess[str]:
|
) -> subprocess.CompletedProcess[str]:
|
||||||
"""
|
"""
|
||||||
Command to run on the host via ssh
|
Command to run on the host via ssh
|
||||||
@ -477,7 +477,7 @@ class Host:
|
|||||||
def ssh_cmd(
|
def ssh_cmd(
|
||||||
self,
|
self,
|
||||||
verbose_ssh: bool = False,
|
verbose_ssh: bool = False,
|
||||||
tty: bool = True,
|
tty: bool = False,
|
||||||
) -> list[str]:
|
) -> list[str]:
|
||||||
if self.user is not None:
|
if self.user is not None:
|
||||||
ssh_target = f"{self.user}@{self.host}"
|
ssh_target = f"{self.user}@{self.host}"
|
||||||
@ -565,7 +565,7 @@ class HostGroup:
|
|||||||
check: bool = True,
|
check: bool = True,
|
||||||
verbose_ssh: bool = False,
|
verbose_ssh: bool = False,
|
||||||
timeout: float = math.inf,
|
timeout: float = math.inf,
|
||||||
tty: bool = True,
|
tty: bool = False,
|
||||||
) -> None:
|
) -> None:
|
||||||
try:
|
try:
|
||||||
proc = host.run_local(
|
proc = host.run_local(
|
||||||
@ -594,7 +594,7 @@ class HostGroup:
|
|||||||
check: bool = True,
|
check: bool = True,
|
||||||
verbose_ssh: bool = False,
|
verbose_ssh: bool = False,
|
||||||
timeout: float = math.inf,
|
timeout: float = math.inf,
|
||||||
tty: bool = True,
|
tty: bool = False,
|
||||||
) -> None:
|
) -> None:
|
||||||
try:
|
try:
|
||||||
proc = host.run(
|
proc = host.run(
|
||||||
@ -640,7 +640,7 @@ class HostGroup:
|
|||||||
timeout: float = math.inf,
|
timeout: float = math.inf,
|
||||||
interactive: bool = False,
|
interactive: bool = False,
|
||||||
verbose_ssh: bool = False,
|
verbose_ssh: bool = False,
|
||||||
tty: bool = True,
|
tty: bool = False,
|
||||||
) -> Results:
|
) -> Results:
|
||||||
results: Results = []
|
results: Results = []
|
||||||
threads = []
|
threads = []
|
||||||
@ -684,7 +684,7 @@ class HostGroup:
|
|||||||
check: bool = True,
|
check: bool = True,
|
||||||
verbose_ssh: bool = False,
|
verbose_ssh: bool = False,
|
||||||
timeout: float = math.inf,
|
timeout: float = math.inf,
|
||||||
tty: bool = True,
|
tty: bool = False,
|
||||||
) -> Results:
|
) -> Results:
|
||||||
"""
|
"""
|
||||||
Command to run on the remote host via ssh
|
Command to run on the remote host via ssh
|
||||||
@ -705,7 +705,7 @@ class HostGroup:
|
|||||||
check=check,
|
check=check,
|
||||||
verbose_ssh=verbose_ssh,
|
verbose_ssh=verbose_ssh,
|
||||||
timeout=timeout,
|
timeout=timeout,
|
||||||
tty=True,
|
tty=tty,
|
||||||
)
|
)
|
||||||
|
|
||||||
def run_local(
|
def run_local(
|
||||||
|
Loading…
Reference in New Issue
Block a user