fix: allow non-Compose commits on Docker-free hosts [skip ci]

This commit is contained in:
deytenit committed 2026-11-08 12:39:48 +03:00
1 parent 36c50290d1
commit a297e7c71e
2 files changed
+40 -2

No files matched your search

+3 -2
View File
@@ -12,8 +12,6 @@ def run(ctx, args):
log, s = ctx.log, ctx.sys
repo = ctx.paths.repo_root
rc_ip = _validate_anchor_ips(ctx)
if not shutil.which("docker"):
log.error("docker is not installed or not in PATH."); return rc_ip or 1
files_string, targets = "", ["."]
if args.hook:
@@ -25,6 +23,9 @@ def run(ctx, args):
log.info("No staged docker-compose files to lint."); return rc_ip
targets = [f"/workdir/{f}" for f in files_string.splitlines()]
if not shutil.which("docker"):
log.error("docker is not installed or not in PATH."); return rc_ip or 1
log.info("Running dclint --fix (via docker)...")
env_args = []
for k in ("HTTP_PROXY", "HTTPS_PROXY", "http_proxy", "https_proxy", "NO_PROXY", "no_proxy"):