mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-24 10:09:01 -06:00
A script line for `ui.screenshot` without a `path` had its generated path assigned with `params["path"] = …`: `serde_json`'s mutable index panics on an array, a string or a number, and the CLI installs no `catch_unwind`, so a script handed to the documented headless workflow aborted the process. Only an object (or null, like an absent `params`) takes the path now; anything else is a script error naming the line, like the existing handling of a malformed line. The regression test runs the real binary on such a script and asserts a non-zero exit, no "panicked" in stderr and the `params` must be a JSON object message (it fails before the fix with `cannot access key "path" in JSON array`).