Validates inputs, builds an argument vector, resolves runtime engine
(native, docker, apptainer), executes via processx::run(), checks
outputs, and returns a structured result.
Usage
ni_run(
call,
...,
dry_run = FALSE,
echo = interactive(),
provenance = TRUE,
error_on_status = TRUE,
return = c("result", "files"),
timeout = Inf,
log_dir = NULL
)Arguments
- call
An
ni_callobject, or a spec ID (in which case remaining args are passed toni_call()).- ...
If
callis a spec ID, passed toni_call().- dry_run
Logical; if
TRUE, print the resolved command and return the inspectable execution plan without executing.- echo
Logical; if
TRUE, print stdout/stderr in real time. Defaults tointeractive().- provenance
Logical; write a provenance JSON sidecar. Default
TRUE.- error_on_status
Logical; if
TRUE(default), error when the command exits with a non-zero status. IfFALSE, issue a warning instead.- return
One of
"result"(default) or"files".- timeout
Wall-time limit in seconds;
Infdisables the limit.- log_dir
Directory for per-invocation logs and provenance. Defaults to
.niflowr/runsbeside the first output, or in the working directory.