From 41c33345686e8577b31227ca52c91189a011b887 Mon Sep 17 00:00:00 2001 From: kronecker <2026692687@qq.com> Date: Mon, 12 Oct 2026 15:19:09 +0800 Subject: [PATCH] fix(delivery): resolve build workspace paths before invoking tools --- scripts/release/build.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/release/build.py b/scripts/release/build.py index d4eca56..825bc6b 100644 --- a/scripts/release/build.py +++ b/scripts/release/build.py @@ -159,6 +159,11 @@ def image(source: Path, expected: str, target: Path) -> dict: def build(repo: Path, inputs: Path, output: Path, work: Path) -> dict: repo = repo.resolve(strict=True) + inputs = inputs.resolve(strict=True) + output = output.resolve() + work = work.resolve() + if output == work or output.is_relative_to(work) or work.is_relative_to(output): + raise DeliveryError("build output and work must be separate") if subprocess.check_output(["git", "status", "--porcelain"], cwd=repo): raise DeliveryError("build requires a clean committed checkout") source_sha = subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=repo, text=True).strip()