upload: hide upload command by default

This commit is contained in:
Jörg Thalheim
2025-05-20 13:17:41 +02:00
parent 9c4333abcb
commit 2f2af072e4
2 changed files with 12 additions and 8 deletions

View File

@@ -130,6 +130,7 @@ class Host:
extra_env: dict[str, str] | None = None,
tty: bool = False,
verbose_ssh: bool = False,
quiet: bool = False,
) -> CmdOut:
"""
Command to run on the host via ssh
@@ -166,13 +167,15 @@ class Host:
export_cmd = f"export {' '.join(env_vars)}; "
displayed_cmd += export_cmd
displayed_cmd += " ".join(cmd)
cmdlog.info(
f"$ {displayed_cmd}",
extra={
"command_prefix": self.command_prefix,
"color": AnsiColor.GREEN.value,
},
)
if not quiet:
cmdlog.info(
f"$ {displayed_cmd}",
extra={
"command_prefix": self.command_prefix,
"color": AnsiColor.GREEN.value,
},
)
# Build the ssh command
bash_cmd = export_cmd

View File

@@ -108,7 +108,8 @@ def upload(
str(remote_dest),
f"{dir_mode:o}",
],
RunOpts(
quiet=True,
opts=RunOpts(
input=f,
log=Log.BOTH,
prefix=host.command_prefix,