Skip to contents

Internal helper every exported deck_*()/initialize_deck_project() function funnels through – the single bridge point, so schema/merge/ compiler logic is never reimplemented in R (see CLAUDE.md's "one engine, two facades" note). Always requests --json output so results come back as a parsed R list (spec section 11.2: "Return structured R lists parsed from CLI JSON") rather than needing prose scraping.

Usage

.run_deckifyr_cli(args)

Arguments

args

Character vector of CLI arguments after deckifyr, e.g. c("validate", "presentation.yaml").

Value

A parsed list from the CLI's JSON output.

Details

Why this isn't a thin wrapper around pyro::run_python_script(): confirmed against a real pyro install, run_python_script() calls processx::run(..., error_on_status = TRUE) and, on any non-zero exit, discards the captured stdout/stderr entirely and raises a bare "<script_name> failed." – so the deckifyr CLI's own diagnostic JSON (which spec section 11.1 requires it to emit on schema/resolution/ composition failure, exit code != 0) would otherwise be lost. The fix is stderr_callback: processx invokes it per output chunk while the process is still running, before the exit-status check fires, so output captured that way survives even when the call ultimately errors. This only works because deckifyr.cli deliberately writes its JSON error payload to stderr rather than stdout on the error path – see the matching comment in inst/python/deckifyr/cli.py's main(). Don't change one side of this handshake without the other.