MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / run

Function run

cli/src/engine.rs:112–120  ·  view source on GitHub ↗

One-shot: open a session, eval `src`, stream stdout, tear down. Returns the process exit code (0 clean, 1 on error, or the script's `SystemExit` code).

(src: &str, manifest: &Manifest)

Source from the content-addressed store, hash-verified

110
111/// One-shot: open a session, eval `src`, stream stdout, tear down. Returns the process exit code (0 clean, 1 on error, or the script's `SystemExit` code).
112pub fn run(src: &str, manifest: &Manifest) -> Result<i32> {
113 let mut session = Session::open(manifest)?;
114 let outcome = session.eval(src, emit_chunk)?;
115 if let Some(err) = outcome.err {
116 crate::ui::traceback(&err);
117 return Ok(1);
118 }
119 Ok(outcome.exit_code.unwrap_or(0))
120}
121
122/// Launch headless Chromium against a system-installed browser. install.sh provisions it.
123fn launch() -> Result<Browser> {

Callers

nothing calls this directly

Calls 2

tracebackFunction · 0.85
evalMethod · 0.80

Tested by

no test coverage detected