()
| 52 | } |
| 53 | |
| 54 | pub async fn sandbox_names() -> Result<Vec<String>, String> { |
| 55 | let (output, code) = run_cli(&["sandbox", "list", "--names"]).await; |
| 56 | let clean = strip_ansi(&output); |
| 57 | if code != 0 { |
| 58 | return Err(format!("sandbox list failed (exit {code}):\n{clean}")); |
| 59 | } |
| 60 | |
| 61 | Ok(clean |
| 62 | .lines() |
| 63 | .map(str::trim) |
| 64 | .filter(|line| !line.is_empty()) |
| 65 | .map(ToOwned::to_owned) |
| 66 | .collect()) |
| 67 | } |
| 68 | |
| 69 | pub async fn wait_for_sandbox_exec_contains( |
| 70 | sandbox_name: &str, |