Skip to content

Commit f314cfd

Browse files
committed
updated
1 parent c6e2a63 commit f314cfd

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

scripts/validate_installer_bundle.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ def _validate_launcher_self_check(bundle_dir: Path) -> None:
137137
f"{resolved_launcher_path}."
138138
)
139139
if not launcher_within_bundle:
140-
raise SystemExit("Invalid launcher path: launch_forge.py must be inside the bundle directory.")
140+
raise SystemExit(
141+
"Invalid launcher path: launch_forge.py must be inside the bundle directory "
142+
f"(launcher={resolved_launcher_path}, bundle={resolved_bundle_dir})."
143+
)
141144

142145
python_executable = _validated_python_executable()
143146
try:
@@ -178,7 +181,14 @@ def _validate_launcher_self_check(bundle_dir: Path) -> None:
178181
try:
179182
report = json.loads(completed.stdout)
180183
except json.JSONDecodeError as exc:
181-
raise SystemExit(f"Launcher self-check failed: invalid JSON output ({exc.msg}).") from exc
184+
stdout_preview_limit = 500
185+
stdout_preview = completed.stdout
186+
if len(stdout_preview) > stdout_preview_limit:
187+
stdout_preview = stdout_preview[:stdout_preview_limit] + "... [truncated]"
188+
raise SystemExit(
189+
"Launcher self-check failed: invalid JSON output "
190+
f"({exc.msg}). stdout={stdout_preview!r}"
191+
) from exc
182192
report_summary = (
183193
f"report_keys={sorted(report.keys())!r}"
184194
if isinstance(report, dict)

0 commit comments

Comments
 (0)