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:
@@ -34,11 +34,14 @@ def is_local_input(node: dict[str, dict[str, str]]) -> bool:
|
|||||||
if not locked:
|
if not locked:
|
||||||
return False
|
return False
|
||||||
# matches path and git+file://
|
# matches path and git+file://
|
||||||
return (
|
local = (
|
||||||
locked["type"] == "path"
|
locked["type"] == "path"
|
||||||
# local vcs inputs i.e. git+file:///
|
# local vcs inputs i.e. git+file:///
|
||||||
or re.match(r"^file://", locked.get("url", "")) is not None
|
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:
|
def upload_sources(machine: Machine, host: Host) -> str:
|
||||||
|
|||||||
Reference in New Issue
Block a user