Merge pull request 'fix(cli/machines/deploy): warn on local input' (#3687) from tennox/clan-core:warn-local-input into main

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3687
Reviewed-by: lassulus <clanlol@lassul.us>
This commit is contained in:
lassulus
2025-05-19 16:58:33 +00:00

View File

@@ -34,11 +34,14 @@ def is_local_input(node: dict[str, dict[str, str]]) -> bool:
if not locked:
return False
# matches path and git+file://
return (
local = (
locked["type"] == "path"
# local vcs inputs i.e. git+file:///
or re.match(r"^file://", locked.get("url", "")) is not None
)
if local:
print(f"[WARN] flake input has local node: {json.dumps(node)}")
return local
def upload_sources(machine: Machine, host: Host) -> str: