MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / run_cli

Function run_cli

e2e/rust/src/harness/cli.rs:15–25  ·  view source on GitHub ↗
(args: &[&str])

Source from the content-addressed store, hash-verified

13use super::output::strip_ansi;
14
15pub async fn run_cli(args: &[&str]) -> (String, i32) {
16 let mut cmd = openshell_cmd();
17 cmd.args(args).stdout(Stdio::piped()).stderr(Stdio::piped());
18
19 let output = cmd.output().await.expect("spawn openshell");
20 let stdout = String::from_utf8_lossy(&output.stdout);
21 let stderr = String::from_utf8_lossy(&output.stderr);
22 let combined = format!("{stdout}{stderr}");
23 let code = output.status.code().unwrap_or(-1);
24 (combined, code)
25}
26
27pub async fn wait_for_healthy(timeout: Duration) -> Result<(), String> {
28 let start = Instant::now();

Callers 2

wait_for_healthyFunction · 0.70
sandbox_namesFunction · 0.70

Calls 2

openshell_cmdFunction · 0.85
codeMethod · 0.80

Tested by

no test coverage detected