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

Function run_cli

e2e/rust/tests/edge_tunnel_e2e.rs:27–39  ·  view source on GitHub ↗

Run `openshell ` using the system's configured gateway.

(args: &[&str])

Source from the content-addressed store, hash-verified

25
26/// Run `openshell <args>` using the system's configured gateway.
27async fn run_cli(args: &[&str]) -> (String, i32) {
28 let mut cmd = openshell_cmd();
29 cmd.args(args)
30 .stdout(Stdio::piped())
31 .stderr(Stdio::piped());
32
33 let output = cmd.output().await.expect("spawn openshell");
34 let stdout = String::from_utf8_lossy(&output.stdout).to_string();
35 let stderr = String::from_utf8_lossy(&output.stderr).to_string();
36 let combined = format!("{stdout}{stderr}");
37 let code = output.status.code().unwrap_or(-1);
38 (combined, code)
39}
40
41/// Run `openshell <args>` with a custom config directory so the CLI reads
42/// our seeded gateway metadata and edge token instead of the real config.

Calls 2

openshell_cmdFunction · 0.85
codeMethod · 0.80

Tested by

no test coverage detected