fix: resolve CAD paths from task workdir
Some checks failed
ci / test (macos-latest, 3.10) (push) Has been cancelled
ci / test (macos-latest, 3.12) (push) Has been cancelled
ci / test (ubuntu-latest, 3.10) (push) Has been cancelled
ci / test (ubuntu-latest, 3.12) (push) Has been cancelled
ci / test (windows-latest, 3.10) (push) Has been cancelled
ci / test (windows-latest, 3.12) (push) Has been cancelled
ci / browser-smoke (push) Has been cancelled
Some checks failed
ci / test (macos-latest, 3.10) (push) Has been cancelled
ci / test (macos-latest, 3.12) (push) Has been cancelled
ci / test (ubuntu-latest, 3.10) (push) Has been cancelled
ci / test (ubuntu-latest, 3.12) (push) Has been cancelled
ci / test (windows-latest, 3.10) (push) Has been cancelled
ci / test (windows-latest, 3.12) (push) Has been cancelled
ci / browser-smoke (push) Has been cancelled
This commit is contained in:
@@ -470,16 +470,24 @@ def doctor() -> int:
|
||||
|
||||
|
||||
def inspect_command(args: argparse.Namespace) -> int:
|
||||
# Internal pipeline scripts run from ROOT so their bundled assets and
|
||||
# schemas have a stable base. User-provided paths, however, are relative
|
||||
# to the directory where cad_showcase.py was invoked (the Task workdir),
|
||||
# not to this repository. Resolve them before crossing that cwd boundary.
|
||||
input_dir = Path(args.input).resolve()
|
||||
work_dir = Path(args.work).resolve()
|
||||
output_dir = Path(args.output).resolve()
|
||||
vendor_dir = Path(args.vendor_dir).resolve()
|
||||
command = python_script(
|
||||
"cad_dxf_report.py",
|
||||
"--input",
|
||||
args.input,
|
||||
str(input_dir),
|
||||
"--work",
|
||||
args.work,
|
||||
str(work_dir),
|
||||
"--output",
|
||||
args.output,
|
||||
str(output_dir),
|
||||
"--vendor-dir",
|
||||
args.vendor_dir,
|
||||
str(vendor_dir),
|
||||
"--converter",
|
||||
args.converter,
|
||||
)
|
||||
@@ -529,6 +537,7 @@ def run_pipeline(args: argparse.Namespace) -> int:
|
||||
source_report = Path(args.source_report).resolve()
|
||||
scope_manifest = Path(args.scope_manifest).resolve()
|
||||
frame_inputs = tuple(Path(path).resolve() for path in args.frames)
|
||||
vendor_dir = Path(args.vendor_dir).resolve()
|
||||
try:
|
||||
waivers = parse_waivers(args.waiver)
|
||||
except ValueError as exc:
|
||||
@@ -600,7 +609,7 @@ def run_pipeline(args: argparse.Namespace) -> int:
|
||||
"--out",
|
||||
str(spec),
|
||||
"--vendor-dir",
|
||||
args.vendor_dir,
|
||||
str(vendor_dir),
|
||||
),
|
||||
[spec],
|
||||
forbidden_stderr=DERIVE_FORBIDDEN_WARNINGS,
|
||||
@@ -616,10 +625,10 @@ def run_pipeline(args: argparse.Namespace) -> int:
|
||||
"--out",
|
||||
str(audit),
|
||||
"--vendor-dir",
|
||||
args.vendor_dir,
|
||||
str(vendor_dir),
|
||||
)
|
||||
if args.frames:
|
||||
audit_cmd.extend(["--frames", *args.frames])
|
||||
if frame_inputs:
|
||||
audit_cmd.extend(["--frames", *[str(path) for path in frame_inputs]])
|
||||
pipeline.run("audit", audit_cmd, [audit, audit_md])
|
||||
audit_report = json.loads(audit.read_text(encoding="utf-8"))
|
||||
invalid_waivers = preflight_waiver_targets(args, report, audit_report, scope_manifest, waivers)
|
||||
@@ -645,7 +654,7 @@ def run_pipeline(args: argparse.Namespace) -> int:
|
||||
"--out-dir",
|
||||
str(overlays),
|
||||
"--vendor-dir",
|
||||
args.vendor_dir,
|
||||
str(vendor_dir),
|
||||
),
|
||||
[overlays],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user