pub fn parse_captures(
stdout: &str,
wanted: &[String],
) -> BTreeMap<String, String>Expand description
Read an action’s declared captures out of its stdout.
Two shapes are accepted, because both are what a real command already
emits: stdout whose first non-whitespace character is { is parsed as a
flat JSON object (cloudctl ... --json), and anything else is read as
KEY=VALUE lines (echo PREVIEW_ID=pv_9). Only declared names are
taken, JSON scalars are stringified, and a name the command did not emit
is simply absent rather than an error — a resource may legitimately
publish a handle only on some runs.