fix(remote): send the off form of a service --x/--no-x flag over --remote

This commit is contained in:
imSp4rky
2026-12-02 17:58:02 -07:00
parent aa09751202
commit 20e06665a1
5 changed files with 93 additions and 4 deletions
+7 -3
View File
@@ -581,9 +581,13 @@ def find_remote_service(services: list[dict], name: str) -> dict | None:
def remote_service_params(info: dict, data: dict[str, Any]) -> dict[str, Any]:
"""The remote service's cli options in ``data``, read by ``service_options``."""
names = {p.get("name") for p in info.get("cli_params") or [] if p.get("kind") == "option"}
return {k: v for k, v in service_options(data, names).items() if v is not None and v is not False}
"""The remote service's cli options in ``data``, without None, and without False for an option off by default."""
defaults = {p.get("name"): p.get("default") for p in info.get("cli_params") or [] if p.get("kind") == "option"}
return {
k: v
for k, v in service_options(data, defaults).items()
if v is not None and (v is not False or defaults[k] is not False)
}
def make_remote_service(