upload: hide upload command by default
This commit is contained in:
@@ -130,6 +130,7 @@ class Host:
|
|||||||
extra_env: dict[str, str] | None = None,
|
extra_env: dict[str, str] | None = None,
|
||||||
tty: bool = False,
|
tty: bool = False,
|
||||||
verbose_ssh: bool = False,
|
verbose_ssh: bool = False,
|
||||||
|
quiet: bool = False,
|
||||||
) -> CmdOut:
|
) -> CmdOut:
|
||||||
"""
|
"""
|
||||||
Command to run on the host via ssh
|
Command to run on the host via ssh
|
||||||
@@ -166,13 +167,15 @@ class Host:
|
|||||||
export_cmd = f"export {' '.join(env_vars)}; "
|
export_cmd = f"export {' '.join(env_vars)}; "
|
||||||
displayed_cmd += export_cmd
|
displayed_cmd += export_cmd
|
||||||
displayed_cmd += " ".join(cmd)
|
displayed_cmd += " ".join(cmd)
|
||||||
cmdlog.info(
|
|
||||||
f"$ {displayed_cmd}",
|
if not quiet:
|
||||||
extra={
|
cmdlog.info(
|
||||||
"command_prefix": self.command_prefix,
|
f"$ {displayed_cmd}",
|
||||||
"color": AnsiColor.GREEN.value,
|
extra={
|
||||||
},
|
"command_prefix": self.command_prefix,
|
||||||
)
|
"color": AnsiColor.GREEN.value,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
# Build the ssh command
|
# Build the ssh command
|
||||||
bash_cmd = export_cmd
|
bash_cmd = export_cmd
|
||||||
|
|||||||
@@ -108,7 +108,8 @@ def upload(
|
|||||||
str(remote_dest),
|
str(remote_dest),
|
||||||
f"{dir_mode:o}",
|
f"{dir_mode:o}",
|
||||||
],
|
],
|
||||||
RunOpts(
|
quiet=True,
|
||||||
|
opts=RunOpts(
|
||||||
input=f,
|
input=f,
|
||||||
log=Log.BOTH,
|
log=Log.BOTH,
|
||||||
prefix=host.command_prefix,
|
prefix=host.command_prefix,
|
||||||
|
|||||||
Reference in New Issue
Block a user